ValidateUtils
in package

Tags
since
1.0

Table of Contents

validateBool()  : bool
validateFloat()  : float|false
validateInt()  : int|false
validateNumber()  : mixed
validatePrice()  : float|false

Methods

validateBool()

public static validateBool(mixed $value) : bool
Parameters
$value : mixed
Tags
since
1.2
Return values
bool

validateFloat()

public static validateFloat(mixed $value[, mixed $min = false ][, mixed $max = false ]) : float|false
Parameters
$value : mixed
$min : mixed = false

Optional. Number or false.

$max : mixed = false

Optional. Number or false.

Tags
since
1.2
Return values
float|false

validateInt()

public static validateInt(mixed $value[, mixed $min = false ][, mixed $max = false ]) : int|false
Parameters
$value : mixed
$min : mixed = false

Optional. Number or false.

$max : mixed = false

Optional. Number or false.

Tags
since
1.2
Return values
int|false

validateNumber()

public static validateNumber(mixed $value[, mixed $min = false ][, mixed $max = false ][, int $filter = FILTER_VALIDATE_FLOAT ]) : mixed
Parameters
$value : mixed
$min : mixed = false

Optional. Number or false.

$max : mixed = false

Optional. Number or false.

$filter : int = FILTER_VALIDATE_FLOAT

Optional. FILTER_VALIDATE_FLOAT by default.

Tags
since
1.0
Return values
mixed

validatePrice()

public static validatePrice(mixed $value, mixed $min[, mixed $max = false ]) : float|false
Parameters
$value : mixed
$min : mixed

Optional. Number or false. 0 by default.

$max : mixed = false

Optional. Number or false.

Tags
since
1.2
Return values
float|false

Search results