Closed vincentmorneau closed 7 years ago
Hi, this is just the default implementation. You can override the handler by setting your own
BrutusinForms.onValidationError = function (element, message) {
element.focus();
if (!element.className.includes(" error")) {
element.className += " error";
}
alert(message);
};
Sounds good! Closing this.
I believe
bf.validate()
https://github.com/brutusin/json-forms/blob/master/src/js/brutusin-json-forms.js#L103 could return a JSON object with the message instead of forcing an alert.Example:
What do you think?