docs depage-forms
Elements
Elements/Email.php
Go to the documentation of this file.
1
<?php
10
namespace
Depage\HtmlForm\Elements
;
11
37
class
Email
extends
Text
38
{
42
protected
$checkDns
=
false
;
43
53
protected
function
setDefaults
()
54
{
55
parent::setDefaults();
56
57
$this->defaults[
'errorMessage'
] = _(
'Please enter a valid email address'
);
58
$this->defaults[
'checkDns'
] =
false
;
59
60
// @todo add option to test mail domain name (dns)
61
}
62
70
protected
function
validatorCall
()
71
{
72
return
$this->validator->validate($this->value, [
'checkDns'
=> $this->checkDns]);
73
}
74
}
75
76
/* vim:set ft=php sw=4 sts=4 fdm=marker et : */
Depage\HtmlForm\Elements\Email
HTML email input type.
Definition
Elements/Email.php:38
Depage\HtmlForm\Elements\Email\validatorCall
validatorCall()
custom validator call hook
Definition
Elements/Email.php:70
Depage\HtmlForm\Elements\Email\$checkDns
$checkDns
checkDns
Definition
Elements/Email.php:42
Depage\HtmlForm\Elements\Email\setDefaults
setDefaults()
collects initial values across subclasses.
Definition
Elements/Email.php:53
Depage\HtmlForm\Elements\Text
HTML text input type.
Definition
Text.php:39
Depage\HtmlForm\Elements
Classes for HTML input-elements.
Definition
Address.php:9