FRED™
3.0
FRED™: Framework for Rapid and Easy Development
Email.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Rsi\Fred\Controller\Widget
;
4
5
class
Email
extends
Char
{
6
7
const
DOMAINS
=
'domains'
;
8
const
DOMAIN_HINT
=
'domainHint'
;
9
10
public
$regex
=
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[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])?)*$/'
;
//https://html.spec.whatwg.org/multipage/input.html#e-mail-state-(type=email)
11
public
$domains
= [];
12
public
$domainHint
= null;
13
14
public
function
clientConfig
(){
15
$config = parent::clientConfig();
16
if
($this->domains) $config[self::DOMAINS] =
$this->domains
;
17
if
($this->domainHint) $config[self::DOMAIN_HINT] = $this->trans->str($this->domainHint);
18
return
$config;
19
}
20
21
protected
function
checkDomain
($value,$index = null){
22
return \Rsi\Valid::email($value);
23
}
24
25
}
Rsi\Fred\Controller\Widget\Email\clientConfig
clientConfig()
Definition:
Email.php:14
Rsi\Fred\Controller\Widget
Definition:
Char.php:3
Rsi\Fred\Controller\Widget\Email\DOMAIN_HINT
const DOMAIN_HINT
Definition:
Email.php:8
Rsi\Fred\Controller\Widget\Email
Definition:
Email.php:5
Rsi\Fred\Controller\Widget\Email\$regex
$regex
Definition:
Email.php:10
Rsi\Fred\Controller\Widget\Email\$domains
$domains
Definition:
Email.php:11
Rsi\Fred\Controller\Widget\Char
Definition:
Char.php:5
Rsi\Fred\Controller\Widget\Email\$domainHint
$domainHint
Definition:
Email.php:12
Rsi\Fred\Controller\Widget\Email\DOMAINS
const DOMAINS
Definition:
Email.php:7
Rsi\Fred\Controller\Widget\Email\checkDomain
checkDomain($value, $index=null)
Definition:
Email.php:21
src
Rsi
Fred
Controller
Widget
Email.php
Generated on Sun Aug 2 2020 19:43:57 for FRED™ by
1.8.13