BaseRules
in package
implements
Stringable
AbstractYes
Class BaseRules.
Table of Contents
Interfaces
- Stringable
Properties
- $rules : array<int, string>
Methods
- __construct() : mixed
- __get() : mixed
- __toString() : string
- blank() : static
- If the field has a blank string, the validation passes.
- create() : static
- empty() : static
- If the field has an empty value, the validation passes.
- null() : static
- If the field value is null, the validation passes.
- optional() : static
- Set field as optional.
- esc() : string
- implode() : string
Properties
$rules
protected
array<int, string>
$rules
= []
Methods
__construct()
public
final __construct() : mixed
Tags
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
__toString()
public
__toString() : string
Return values
stringblank()
If the field has a blank string, the validation passes.
public
blank() : static
Tags
Return values
staticcreate()
public
static create() : static
Return values
staticempty()
If the field has an empty value, the validation passes.
public
empty() : static
Tags
Return values
staticnull()
If the field value is null, the validation passes.
public
null() : static
Tags
Return values
staticoptional()
Set field as optional.
public
optional() : static
If field is undefined, validation passes.
Return values
staticesc()
protected
esc(string $value) : string
Parameters
- $value : string
Return values
stringimplode()
protected
implode(array<string|int, scalar> $values) : string
Parameters
- $values : array<string|int, scalar>