It would be good to allow the message attribute on setMessage to allow a function so we have more freedom with our error messages. I'm trying to make the error messages match up with with the errors returned by the server. For example, Laravel returns the following error for a missing field The :attribute field is required. with :attribute being replaced with the name of the field.
So something like...
hyperform.setMessage(element, 'valueMissing', (el) => `The ${el.name} field is required.`);
It would be good to allow the message attribute on
setMessageto allow a function so we have more freedom with our error messages. I'm trying to make the error messages match up with with the errors returned by the server. For example, Laravel returns the following error for a missing fieldThe :attribute field is required.with:attributebeing replaced with the name of the field.So something like...