Is there a built-in method to validate that two fields in combination
are unique?
e.g. if my table is :
username | password
user1 | pass1
the following happens
MyObject.new(username=>“user1”,password=>“pass2”) => ok
MyObject.new(username=>“user2”,password=>“pass1”) => ok
MyObject.new(username=>“user1”,password=>“pass1”) => not ok
Thanks