codeigniter-base-model
codeigniter-base-model copied to clipboard
trim validation
Hi,
I noticed that if I added a few spaces before one of the fields and I ask to trim it as a validation, I noticed that the field got trimmed only if there is a validation errors in one of the other fields but if everything is fine and that field does have few spaces it does add these spaces to the DB.
Please advise.
you need to trim is manually, in before_create use php function trim($field)
validation trim just remove the spaces when field have no other character