Pristine
Pristine copied to clipboard
data-pristine-attributes should always be used when the 2 versions of the attribute exists
As mentionned in https://github.com/sha256/Pristine/issues/10, the pristine pattern validation does not respect the native HTML5 validation format. To ensure a proper validation, we should use the 2 of them on a input by placing the HTML5 RegEx format into the pattern attribute and the JS RegEx format into the data-pristine-pattern.
I tried to do this and I got an error on the pattern attribute RegEx format, but only when I place it after the data-pristine-pattern attribute in my input. When I place it before, there is no problem.
I think that, no matter the order, the data-pristine-attribute shloud always be used if there are the 2 versions of the attributes.