dominar
dominar copied to clipboard
Add support for adding basic validation by attributes
Might be a good idea?
<input type="text" name="username" data-dominar="required|alpha">
I'm sure there are folks who would like it.... not me! I really liked REMOVING all the markup when I moved from brand x to Dominar.
I somewhat agree, as I don't like libraries like parsley.js or others that promote putting a lot of validation logic in the elements themselves, but because dominar is so terse in specifying rules it can sometimes be quicker to specify them in-line and still look clean. A lot of people like doing it as well, so I wouldn't want to put those guys off using dominar.
With that said, it's pretty easy to support this yourself with some custom code (or I may make it optional inclusion at some point, dominar-inline.js
or something).