Investigate use of HTML5 validation API in conjunction with regula (preference given to HTML5 validation over regula constraints)
vivin opened this issue · 1 comments
regula doesn't support HTML5 validation attributes. This is something that should be supported. Regula should search for elements with HTML5 validation attributes and include them in the list of elements to be validated. When validation is performed, the native HTML5 validation API should be used. If an element contains both regula and HTML5 validation constraints (for example required and @required), the HTML5 validation constraint should be supersede the regula constraint.
This has been implemented. HTML5 validation uses its own constraints and Regula does not defer to native validation. Regula doesn't attempt to emulate HTML5 validation behavior either, as this requires the creation of HTML5 components as well. Regula will, however, use the HTML5 native validation-api for HTML5 constraints that are bound through Regula. For HTML5 validation to work properly with Regula, either a compliant browser or a polyfill must be used. The latter approach seems to be standard for implementing HTML5 validation in a cross-browser manner.