Welcome Guest, Not a member yet? Register   Sign In
in_unique Validation Rule Help
#1

Hello! 
I am building a section for people to update their email addresses along with their name. I have a validation rule that checks that the email address entered is unique but I also need to ensure that the error doesn't happen if the email hasn't changed. I have came up with this rule based on the docs but it just throws the error.

PHP Code:
'email'=> 'required|valid_email|is_unique[users.email, users.email, '.$existingUserDetails['email'].']'

I tried using {email} instead of hard coding the value but throws an error: The placeholder field cannot use placeholder: email

Just trying to avoid having to roll my own rule for this as is_unique ticks all the boxes.
Reply


Messages In This Thread
in_unique Validation Rule Help - by purpleprawn - 11-29-2023, 09:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB