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:

 < 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   

hope Does that help :)

Comments

Popular posts from this blog

sql - Return Function using Cursor -

sql server - How to use pivot in this table -

javascript - Is there any way to add a new parameter to a function programmatically? -