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

(11-29-2023, 01:39 PM)grimpirate Wrote: This example https://codeigniter4.github.io/userguide...aceholders shows exactly what you're attempting to achieve. The only possible difference I see is that your statement for is_unique should be is_unique[users.email,email,{email}]. Though you should probably be using the user id instead to ignore the user's present email (as per the example).

In a more general sense. The user is opting to change their email. It doesn't matter what their previous email is. Whether they update it to a new value or the same value is irrelevant. The only thing that requires validation is that they aren't trying to use someone else's registered email.

Sorry for the delay in getting back to this! So the ID isn't part of the form so I can't use the example unless you can pass in the ID?

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

Theme © iAndrew 2016 - Forum software by © MyBB