Documentation

DataValidation
in package

[$validation = $this->core->loadClass('DataValidation');] Class to facilitate data validation

Table of Contents

Properties

$error  : mixed
$errorFields  : mixed
$errorMsg  : mixed
$field  : mixed
$typeError  : mixed

Methods

setError()  : mixed
transformValue()  : mixed
Transform data based on obtions: forcevalue, defaultvalue, trim, tolowercase, touppercase
validateDate()  : bool
Formats: Length bt. 8 to 10 depending of the year formar (YY or YYYY)
validateDateTime()  : bool
Formats: Length bt. 15 to 17 depending of the year formar (YY or YYYY)
validateDateTimeISO()  : bool
Formats: Length bt. 23 or 25 depending of the year formar (YY or YYYY)
validateEmail()  : mixed
validateFixLength()  : mixed
validateMaxLength()  : mixed
validateMinLength()  : mixed
validateModel()  : bool
Validate the content of $data based on $model
validateName()  : mixed
validateRange()  : mixed
validateRegexMatch()  : bool|int
Validate if the content match with a regex expresion
validateUnsigned()  : mixed
validateValues()  : mixed
validContent()  : mixed
validType()  : bool
Validate no empty data based in the type
extractOptionValue()  : mixed

Properties

Methods

setError()

public setError(mixed $msg) : mixed
Parameters
$msg : mixed

transformValue()

Transform data based on obtions: forcevalue, defaultvalue, trim, tolowercase, touppercase

public transformValue( $data,  $options) : mixed
Parameters
$data :
$options :

validateDate()

Formats: Length bt. 8 to 10 depending of the year formar (YY or YYYY)

public validateDate( $data) : bool
Parameters
$data :
Return values
bool

validateDateTime()

Formats: Length bt. 15 to 17 depending of the year formar (YY or YYYY)

public validateDateTime( $data) : bool
Parameters
$data :
Return values
bool

validateDateTimeISO()

Formats: Length bt. 23 or 25 depending of the year formar (YY or YYYY)

public validateDateTimeISO( $data) : bool
Parameters
$data :
Return values
bool

validateEmail()

public validateEmail(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateFixLength()

public validateFixLength(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateMaxLength()

public validateMaxLength(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateMinLength()

public validateMinLength(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateModel()

Validate the content of $data based on $model

public validateModel(array<string|int, mixed> &$model, array<string|int, mixed> &$data[, array<string|int, mixed> &$dictionaries = [] ][, bool $all = true ][, string $extrakey = '' ]) : bool
Parameters
$model : array<string|int, mixed>
$data : array<string|int, mixed>
$dictionaries : array<string|int, mixed> = []
$all : bool = true
$extrakey : string = ''
Return values
bool

validateName()

public validateName(mixed $key, mixed $data) : mixed
Parameters
$key : mixed
$data : mixed

validateRange()

public validateRange(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateRegexMatch()

Validate if the content match with a regex expresion

public validateRegexMatch( $key,  $options,  $data) : bool|int
Parameters
$key :
$options :
$data :
Return values
bool|int

validateUnsigned()

public validateUnsigned(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validateValues()

public validateValues(mixed $key, mixed $options, mixed $data) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed

validContent()

public validContent(mixed $key, mixed $options, mixed &$data[, array<string|int, mixed> &$dictionaries = [] ]) : mixed
Parameters
$key : mixed
$options : mixed
$data : mixed
$dictionaries : array<string|int, mixed> = []

validType()

Validate no empty data based in the type

public validType( $key,  $type,  &$data) : bool
Parameters
$key :
$type :
$data :
Return values
bool

extractOptionValue()

private extractOptionValue(mixed $tag, mixed $options) : mixed
Parameters
$tag : mixed
$options : mixed

        
On this page

Search results