This PR adds a basic validation interface which extends the native HTML validation implementation.
A developer can now:
Have the is-error class toggle automatically based on validity of input elements
Add a custom error message by adding a data-validation-message attribute to an element
The validation interface will also check sibling inputs when an input fails validation. This will remove the is-error class if they are valid when they were previously invalid.
Lastly, a basic Webpack setup has been added along with these changes.
This PR adds a basic validation interface which extends the native HTML validation implementation.
A developer can now:
is-error
class toggle automatically based on validity of input elementsdata-validation-message
attribute to an elementThe validation interface will also check sibling inputs when an input fails validation. This will remove the
is-error
class if they are valid when they were previously invalid.Lastly, a basic Webpack setup has been added along with these changes.
Fixes #2 🚀