ClientSideValidations will currently filter out any conditional validators. Devise sets some of the validators as conditional: https://github.com/plataformatec/devise/blob/master/lib/devise/models/validatable.rb#L24-32
The reason I did this is because there is no good way for a client to determine the true meaning of this conditional. I could do this while creating the form, but what if this conditional value depends on the value that can be changed in the form? So I decided to filter them out and let things go back to the server.
It was an idea, but it is clear that it imposed unfair restrictions on some things. This is the most obvious (and popular).
Therefore, I plan to release a new version soon, which will allow you to explicitly override conditional filters. It will work as follows:
<%= f.text_field :password, :validate => { :presence => true, :confirmation => true } %>
or
<%= f.text_field :password, :validate => true %>
In the first case, you can choose which validators to disable the filter. In the second case, it will disable the filter for all validators by this attribute. The conditional value will be evaluated during the creation of the form and, if it passes, will add a validator to the input element for use on the client.
source share