1 | <?php |
||
30 | class EmailValidatorAnnotation extends ValidatorAnnotation |
||
31 | { |
||
32 | |||
33 | use AllowEmpty; |
||
34 | |||
35 | /** |
||
36 | * @var string the regular expression used to validate the attribute value. |
||
37 | * @see http://www.regular-expressions.info/email.html |
||
38 | */ |
||
39 | public $pattern = EmailValidator::EmailPattern; |
||
40 | |||
41 | /** |
||
42 | * @var string the regular expression used to validate email addresses with the name part. |
||
43 | * This property is used only when {@link allowName} is true. |
||
44 | * @see allowName |
||
45 | */ |
||
46 | public $fullPattern = EmailValidator::FullEmailPattern; |
||
47 | |||
48 | /** |
||
49 | * @var boolean whether to allow name in the email address (e.g. "Qiang Xue <[email protected]>"). Defaults to false. |
||
50 | * @see fullPattern |
||
51 | */ |
||
52 | public $allowName = false; |
||
53 | |||
54 | /** |
||
55 | * @var boolean whether to check the MX record for the email address. |
||
56 | * Defaults to false. To enable it, you need to make sure the PHP function 'checkdnsrr' |
||
57 | * exists in your PHP installation. |
||
58 | */ |
||
59 | public $checkMX = false; |
||
60 | |||
61 | /** |
||
62 | * @var boolean whether to check port 25 for the email address. |
||
63 | * Defaults to false. To enable it, ensure that the PHP functions 'dns_get_record' and |
||
64 | * 'fsockopen' are available in your PHP installation. |
||
65 | */ |
||
66 | public $checkPort = false; |
||
67 | |||
68 | 1 | public function init() |
|
87 | |||
88 | } |
||
89 |