Happy.js
Happy.js copied to clipboard
Custom positioning for error messages
Add the ability to place the error message before or after the input. Sometimes it is nice that it floats next to the input, so maybe the error message can be placed inside a certain element.
There was a PR that changed the default behavior to after, and it was an accessibility fix which ranks pretty high IMO.
I don't really want to add a funky config option to change that to before or after, but maybe being able to pass in a selector would allow everyone the flexibility they need if .after() doesn't work for them.
The errorTarget option is also available on the field level. I just use that to direct my error messages on a per-field basis.