Where to check if email exists....
i'm a bit confused about VALIDATION
in my app i need to create a model (technician) associated to the User model (ok)
i have the technician email field sets as unique in the db
when i create a technician with a non unique email, i need to send a notification
now i get an error page with the sql statemnt of duplicated email
in the form i have
is not enough?
8 Replies
also this doesn't works
I'm watching some videos, and in all of them, when validation is enabled, a red message appears. I can't seem to do it.
yes, i saw this solution but the problem ssems thah validation is not fired
if i have a technician in the db with email [email protected]
when i type tec@ i'm expecting a red flag "hey this email already exists"
If that is the case, you will be mounting the form incorrect. Please provide the whole page code.
ah ok, wait, now it works after i click on the button
also with the ignoreRecord: true active, i can't update the record
ignoreRecord: true means it ignores this record. Are you sure you don't have duplicated emails in the database already