Welcome Guest, Not a member yet? Register   Sign In
Problem with validation and 'trim'
#3

(02-19-2020, 01:16 PM)php_rocs Wrote: @Fido L Dido,

Are you sure that the trim is working properly as a rule?  Have you printed it out? You could also remove trim() from the rules and add it to the sql statement to trim the value before insert/updating the database.

It appears to me that none of the rules are able to alter the data it is validating, which would explain why 'trim' isn't doing anything but the other rules work fine. I shall resort to trimming the input data before validating which should address the issue. I may look to see if it is possible to create a custom rule that works with a reference to the data meaning that, in theory, it should be able to be modified.
Reply


Messages In This Thread
RE: Problem with validation and 'trim' - by Fido L Dido - 02-20-2020, 06:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB