Aplus Framework Docs

BaseRules
in package
implements Stringable

Class BaseRules.

Interfaces, Classes, Traits and Enums

Stringable

Table of Contents

$rules  : array<int, string>
$rules  : array<string|int, mixed>
__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 read-only

public array<int, string> $rules

$rules

protected array<string|int, mixed> $rules = []

Methods

__construct()

public final __construct() : mixed
Tags
since
2.3
Return values
mixed

__get()

public __get(string $property) : mixed
Parameters
$property : string
Return values
mixed

__toString()

public __toString() : string
Return values
string

blank()

If the field has a blank string, the validation passes.

public blank() : static
Tags
since
2.2
Return values
static

create()

public static create() : static
Return values
static

empty()

If the field has an empty value, the validation passes.

public empty() : static
Tags
since
2.2
Return values
static

null()

If the field value is null, the validation passes.

public null() : static
Tags
since
2.2
Return values
static

optional()

Set field as optional.

public optional() : static

If field is undefined, validation passes.

Return values
static

esc()

protected esc(string $value) : string
Parameters
$value : string
Return values
string

implode()

protected implode(array<string|int, scalar> $values) : string
Parameters
$values : array<string|int, scalar>
Return values
string

Search results