I do not want to display error messages from ParsleyJS

I use the ParsleyJS library to validate my form, but if the field is invalid, I only want to apply error classes, but I do not want to display error messages. If I use the data-show-errors="false property, neither the class nor the error is displayed. I used this display:none placement method in css:

  ul.parsley-error-list {
             display: none! important;
         }
         ul.parsley-error-list li {
             display: none! important;
         } 
and it works, but I wanted to know if this is suitable for this, or if the library has a way to configure it? Thanks!
+7
source share
2 answers

No, you are right, there is currently no support for this option, and it would be nice to provide it initially in config.

I will consider it or feel free to add it and send PR.

thanks

+3
source share

Starting with version 2.0+, you can disable error messages with the addition of:

data-parsley-errors-messages-disabled

for form input elements. This will not disable the red color marking of the inputs.

+9
source share

All Articles