Welcome Guest, Not a member yet? Register   Sign In
is_unique in Form Validation on UPDATE

(06-06-2016, 05:27 AM)keulu Wrote: for me, if i have to check differents values on UPDATE or INSERT, I create 2 validation rules.

// user_validation_insert => 'email' => 'valid_email|is_unique[user.email]'

// user_validation_update => 'email' => 'valid_email'

something like that

But what if you changed your email when editing? It still has to be unique, so the check has to be run, otherwise you could change it to an email which already exists.

Messages In This Thread
RE: is_unique in Form Validation on UPDATE - by JayAdra - 06-06-2016, 06:55 AM

Theme © iAndrew 2016 - Forum software by © MyBB