Skip to content

Commit 60bbac5

Browse files
committed
Document new email validation types
1 parent 2c39473 commit 60bbac5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

validation.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,19 @@ When working with arrays, the field under validation must not have any duplicate
744744
<a name="rule-email"></a>
745745
#### email
746746

747-
The field under validation must be formatted as an e-mail address.
747+
The field under validation must be formatted as an e-mail address. Under the hood the rule makes use of the [`egulias/email-validator`](https://github.com/egulias/EmailValidator) package for validating the email address. By default the `RFCValidation` is applied but you can apply other or multiple validation rules:
748+
749+
'email' => 'email:rfc,dns'
750+
751+
This will apply the `RFCValidation` and `DNSCheckValidation` validations. Here's a full list of validations you can apply:
752+
753+
- `rfc`: `RFCValidation`
754+
- `strict`: `NoRFCWarningsValidation`
755+
- `dns`: `DNSCheckValidation`
756+
- `spoof`: `SpoofCheckValidation`
757+
- `filter`: `FilterEmailValidation`
758+
759+
The `filter` validation ships with Laravel and is the pre-5.8 behavior. It uses PHP's `filter_var` function under the hood.
748760

749761
<a name="rule-ends-with"></a>
750762
#### ends_with:_foo_,_bar_,...

0 commit comments

Comments
 (0)