Regex should output HTML "pattern" attribute on inputs

#47 · closed · 2 comments

View on GitHub ↗

levinse

Please output the "pattern" attribute in the HTML, on input type="text" only, if regex is set, to provide consistent client-side validation. The value should be the regex. This should not be output on type="url" or type="email" even if regex is set. Presently I have to duplicate the regex definition and add pattern attributes everywhere I have the regex attribute on text inputs.

Comments

Gregwar

Hello, I updated that and also tagged `v1.1.4` so that it can be used with stable `*` dependency

Gregwar

Thanks for contributing