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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -