class Email extends Rule
Email address validation rule
Constants
INTEGER_TYPE |
|
STRING_TYPE |
|
FLOAT_TYPE |
|
BOOLEAN_TYPE |
|
NUMBER_TYPE |
|
ITEMS_ARRAY |
|
Properties
protected string|null | $error | Rule error | from Rule |
protected string|null | $defaultError | Default errror code | from Rule |
protected array | $errorParams | Error params | from Rule |
protected Collection | $params | Rule params | from Rule |
Methods
mixed
getType()
Return filter type
__construct(array $params = [], string|null $error = null)
Constructor
Details
at line 37
mixed
getType()
Return filter type
in Rule at line 68
bool
validate(mixed $value)
Validate rule value callback
at line 25
__construct(array $params = [], string|null $error = null)
Constructor
in Rule at line 92
void
setDefaultError(string $errorCode)
Set default error code
in Rule at line 102
Collection
getParams()
Return rule params
in Rule at line 112
boolean
isRequired()
Return true if field rule is required
in Rule at line 123
void
required(boolean $value = true)
Set rule required
in Rule at line 135
protected bool
validateType(mixed $value, int $type)
Validate field type
in Rule at line 174
void
setError(string|null $error, string|null $default = null)
Set validation error ode
in Rule at line 185
array
getErrorParams()
Get error params
in Rule at line 196
void
setErrorParams(array $params = [])
Set error params
in Rule at line 206
string|null
getError()
Return validation error code