sha256 / Pristine

Vanilla javascript form validation micro-library
https://pristine.js.org/
MIT License
410 stars 81 forks source link

Ability to use form element itself for error class target #64

Closed vovayatsyuk closed 3 years ago

vovayatsyuk commented 3 years ago

This feature allows adding error class to the form element instead of its parent when classTo is set to false or empty.

Example:

<input type="text" name="firstname" class="input-text {{error-class}}" required>