NYPD / ritsu.js

HTML form validation
MIT License
2 stars 0 forks source link

Allow to get error message for particular input(s) #61

Closed NYPD closed 7 years ago

NYPD commented 7 years ago

Or maybe some sort of functionality to display error messages somewhere else.

NYPD commented 7 years ago

I think this is a two parter.

NYPD commented 7 years ago

And a third

NYPD commented 7 years ago

Perhaps error messages should just take a generic function to deal with error messages in general

NYPD commented 7 years ago

The error callback function will be called on each element validated, it will be supplied the element itself and the error message regardless if it is valid or not. If it is valid, error message will be null.

This change was added in 777f929

NYPD commented 7 years ago

errorCallback should be renamed messageCallback