forked from DavyJonesLocker/client_side_validations
-
Notifications
You must be signed in to change notification settings - Fork 0
Devise
bcardarella edited this page May 18, 2011
·
1 revision
Devise's validation strategies add conditionals to the validators
By design ClientSideValidations will filter out all validators with conditionals. However, you can override this behavior on each input.
<%= f.text_field :password, :validate => true -%>
<%= f.text_field :password, :validate => { :presence => true } -%>In the first case all validators for the :password attribute will be forced to obey any conditionals. In the second case only the :presence validator will obey conditionals.
"Obeying" conditionals means the conditional will be evaluated at the point the form is generated.