Search code examples
javascriptparsley.jsparsley

Clarification on data-parsley-`constraint`-message in Parsley.js


As per the documentation, Parsley allows us to override error messages with the data attribute data-parsley-constraint-message.

What's not specified, however, is a complete list of constraint names you can use.

The only example we have in the documentation pertains the required constraint, but what about all of the other error messages?

Let's say I want to customize the error message for an invalid email (default is 'This value should be a valid email.'): how can I do that with that data attribute?

Where can I find a complete list of all "constraint" names?

Thank you!


Solution

  • The built-in constraints (aka validators) are listed in the doc