@@ -7,7 +7,7 @@ cast to a string before being validated.
77+----------------+---------------------------------------------------------------------+
88| Applies to | :ref: `property or method <validation-property-target >` |
99+----------------+---------------------------------------------------------------------+
10- | Options | - `strict `_ |
10+ | Options | - `mode `_ |
1111| | - `message `_ |
1212| | - `checkMX `_ |
1313| | - `checkHost `_ |
@@ -91,14 +91,34 @@ Basic Usage
9191 Options
9292-------
9393
94+ mode
95+ ~~~~
96+
97+ **type **: ``string `` **default **: ``loose ``
98+
99+ This option is optional and defines the pattern the email address is validated against.
100+ Valid values are:
101+
102+ * ``loose ``
103+ * ``strict ``
104+ * ``html5 ``
105+
106+ loose
107+ .....
108+
109+ A simple regular expression. Allows all values with an "@" symbol in, and a "."
110+ in the second host part of the email address.
111+
94112strict
95- ~~~~~~
113+ ......
96114
97- **type **: ``boolean `` **default **: ``false ``
115+ Uses the `egulias/email-validator `_ library to perform an RFC compliant
116+ validation. You will need to install that library to use this mode.
117+
118+ html5
119+ .....
98120
99- When false, the email will be validated against a simple regular expression.
100- If true, then the `egulias/email-validator `_ library is required to perform
101- an RFC compliant validation.
121+ This matches the pattern used for the `HTML5 email input element `_.
102122
103123message
104124~~~~~~~
@@ -127,3 +147,4 @@ of the given email.
127147.. include :: /reference/constraints/_payload-option.rst.inc
128148
129149.. _egulias/email-validator : https://packagist.org/packages/egulias/email-validator
150+ .. _HTML5 email input element : https://www.w3.org/TR/html5/sec-forms.html#email-state-typeemail
0 commit comments