ValidateUtils
in package
Tags
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
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
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
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
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.