Hi
I have 2 questions:
I want to validate that 3 fields together must be unique. e.g -
first_name, last_name and birth_date.
To ensure 2 fields are unique as a group I can do this:
validates_uniqueness_of :first_name, :scope => "last_name"
1) How do I add the third term so that all three are checked together?
Just to ensure my question is clear:
---John Smith DOB 4/4/1970 and John Smith DOB 4/4/1980 would be
allowed but not if all three fields matched.
2) How do I set it to highlight all three fields but only output one
message like "First name, last name & birth date must be unique"
Thanks,
Dewey