Welcome Guest, Not a member yet? Register   Sign In
Help with validation rule checking for uniqueness
#3

[eluser]Unknown[/eluser]
Understood. I'm talking specifically about validation rules to ensure that fields on the record being updated are unique. The validation function that checks for uniqueness sees the existing record and corresponding fields in the database.

For instance, my schema requires email to be unique. when I go to edit a record, but leave the email the same as before, it fails validation saying email needs to be unique. It sees the existing record's email and thinks I'm creating a new record with the same email.

I'd like to know if there is a way to create a validation rule that would take in the ID of the row being updated. That way, the validation rule could ensure unique for all records BESIDES the row being updated.

So the big question is can I do this with some kind of override in the validation helper, or do I need to do this in each controller update function?

Thanks,
-DK


Messages In This Thread
Help with validation rule checking for uniqueness - by El Forum - 07-11-2009, 05:07 PM
Help with validation rule checking for uniqueness - by El Forum - 07-12-2009, 12:39 AM
Help with validation rule checking for uniqueness - by El Forum - 07-12-2009, 09:02 AM
Help with validation rule checking for uniqueness - by El Forum - 07-14-2009, 12:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB