Rails Validations - Reverse of Confirmation Validation -
I have to make sure that the two attributes do not have the same value with verification in my Rails4 application. I know about confirmation verification, but I want exactly the opposite. Is this kind of railroad recognition? You need to create a custom verification that I believe: hope Does that help :)
< Code> validate: check_edit1 and_datite2def def_attribute1_and_attribute2 if attribute_1 == attribute_2 errors.add (hopefully: column_2, 'value can not be equal to value 1!') And end
Comments
Post a Comment