Welcome Guest, Not a member yet? Register   Sign In
is_unique in form validation doesn't do what I expect
#1

[eluser]Unknown[/eluser]
Could be me..

the code checks if there is *any* instance of the field value in the nominated database table. I don't call this unique. Unique means none or one (but no more than one).

The upshot is that in a typical scenario of editing an existing record using a form the validation fails because the value already exists in the table - it's the record you are editing.




Theme © iAndrew 2016 - Forum software by © MyBB