validator extends facade
Facade for local_middag\framework\support\validator.
Tags
Table of Contents
Methods
- get_facade_accessor() : string
- Return the service accessor key for this facade.
- is_email() : bool
- is_not_empty() : bool
- is_uuid() : bool
- validate() : array<string|int, mixed>
- validate_cnpj() : bool
- validate_cpf() : bool
Methods
get_facade_accessor()
Return the service accessor key for this facade.
public
static get_facade_accessor() : string
Return values
stringis_email()
public
static is_email(string $email) : bool
Parameters
- $email : string
Return values
boolis_not_empty()
public
static is_not_empty(string $value[, int $minLength = = '1' ][, int|null $maxLength = = 'null' ]) : bool
Parameters
- $value : string
- $minLength : int = = '1'
- $maxLength : int|null = = 'null'
Return values
boolis_uuid()
public
static is_uuid(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolvalidate()
public
static validate(mixed $data, Validatable $rules) : array<string|int, mixed>
Parameters
- $data : mixed
- $rules : Validatable
Return values
array<string|int, mixed>validate_cnpj()
public
static validate_cnpj(string $cnpj) : bool
Parameters
- $cnpj : string
Return values
boolvalidate_cpf()
public
static validate_cpf(string $cpf) : bool
Parameters
- $cpf : string