Documentation

Validation

Table of Contents

$errors  : mixed
$messages  : mixed
__construct()  : string
Compile input.
databaseCompile()  : string
Compile Database Unique.
error()  : $this
Store error msgs.
fail()  : bool
Check if their any error exists.
first()  : string
Get the first error msg.
get()  : string
Get the error msg.
has()  : string
Check whether the error has or not.
inputCompile()  : string
Compile input.
jsonCompile()  : string
Compile Json.
last()  : string
Get the last error msg.
make()  : string
Compile input.

Properties

Methods

__construct()

Compile input.

public __construct( $input, mixed $rule[, mixed $type = 'input' ]) : string
Parameters
$input :

input value $role required etc $type input

$rule : mixed
$type : mixed = 'input'
Return values
string

databaseCompile()

Compile Database Unique.

public databaseCompile( $data, mixed $table) : string
Parameters
$data :

(array) ['policies'] => policies ['value'] => Value to be checked ['field'] => field name

$table : mixed
Return values
string

error()

Store error msgs.

public error() : $this
Return values
$this

fail()

Check if their any error exists.

public fail() : bool
Return values
bool

first()

Get the first error msg.

public first([ $key = null ]) : string
Parameters
$key : = null

key of error

Return values
string

get()

Get the error msg.

public get([ $key = null ]) : string
Parameters
$key : = null

key of error msg

Return values
string

has()

Check whether the error has or not.

public has( $key) : string
Parameters
$key :

key of error msg

Return values
string

inputCompile()

Compile input.

public inputCompile( $data) : string
Parameters
$data :

(array) ['policies'] => policies ['value'] => Value to be checked ['field'] => field name

Return values
string

jsonCompile()

Compile Json.

public jsonCompile( $data, mixed $policie) : string
Parameters
$data :

(array) ['policies'] => policies ['value'] => Value to be checked ['field'] => field name

$policie : mixed
Return values
string

last()

Get the last error msg.

public last([ $key = null ]) : string
Parameters
$key : = null

key of error msg

Return values
string

make()

Compile input.

public make( $data, mixed $policies, mixed $type) : string
Parameters
$data :

(array) ['policies'] => policies ['value'] => Value to be checked ['field'] => field name

$policies : mixed
$type : mixed
Return values
string

Search results