Parsley.js
Parsley.js copied to clipboard
What are the accepted values for 'assert' in addError method?
In the docs we can use the addError method to programmatically add an error to a field:
addError(name, {message: , assert: , updateClass: true});
One of the properties we can pass is assert what is assert and what values does it accept?
I cannot find the answer for this anywhere.
Thanks!
assert is elsewhere in the code named constraint, it is used to lookup the error message if one is not provided (e.g. mincheck)
Note that usage of addError is discouraged and shouldn't be needed #1073
Thanks!
^ if adderror is discouraged, the documentation needs to be updated:
https://parsleyjs.org/doc/index.html#ui-for-javascript
Good point, I'm removing that section altogether 👍