Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
EmailValidator.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\contents\validation\validators\strings
;
4
12
class
EmailValidator
extends
RegexValidator
{
13
14
public
function
__construct
() {
15
$this->message =
"{value} is not a valid email address"
;
16
$this->ref =
"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/i"
;
17
$this->match =
true
;
18
}
19
25
public
function
asUI
(): array {
26
return [
'inputType'
=>
'email'
]+\array_merge_recursive(parent::
asUI
() , [
'rules'
=> [
'email'
]]);
27
}
28
}
29
Ubiquity\contents\validation\validators\strings\EmailValidator
Validates an email address Usage @validator("email")
Definition
EmailValidator.php:12
Ubiquity\contents\validation\validators\strings\EmailValidator\__construct
__construct()
Definition
EmailValidator.php:14
Ubiquity\contents\validation\validators\strings\EmailValidator\asUI
asUI()
{{}\Ubiquity\contents\validation\validators\ValidatorasUI()}
Definition
EmailValidator.php:25
Ubiquity\contents\validation\validators\strings\RegexValidator
Validates a string with a regex Usage @validator("regex",pattern)
Definition
RegexValidator.php:14
Ubiquity\contents\validation\validators\strings
Definition
EmailValidator.php:3
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
contents
validation
validators
strings
EmailValidator.php
Generated on Sun Dec 10 2023 15:04:16 for
Ubiquity
by
doxygen
1.9.8