Skip to content
Snippets Groups Projects
Commit 74ab9bd6 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

mail pattern

parent ce31af90
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
<attribute name="name">email</attribute> <attribute name="name">email</attribute>
<attribute name="t-att-value">email</attribute> <attribute name="t-att-value">email</attribute>
<attribute name="t-attf-class">form-control {{'is-invalid' if error_email else ''}}</attribute> <attribute name="t-attf-class">form-control {{'is-invalid' if error_email else ''}}</attribute>
<!-- regexp prise sur https://developer.mozilla.org/fr/docs/Web/HTML/Element/input/email#validation_simple -->
<!-- mais avec un '+' plutôt qu'un '*' à la fin, comme demandé par solagro -->
<!-- et échappée correctement -->
<attribute name="pattern">^[a-zA-Z0-9.!#$%&amp;'*+\/=?^_`\{\|\}~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)+$</attribute>
</xpath> </xpath>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment