Is there any way to trigger validation only in specific forms(controller’s action), not globally at every save or update?
Something like User.create(:validate=>true) flag.
Is there any way to trigger validation only in specific forms(controller’s action), not globally
Share
Yes, you can supply conditionals to the validations, eg:
Now all you have to do to turn on these validations is: