DataValidation
class DataValidation (View source)
Constants
STRING |
|
BOOL |
|
BOOLEAN |
|
INT |
|
INTEGER |
|
NUMBER |
|
DOUBLE |
|
FLOAT |
|
JSON |
|
SERIALIZED |
|
ARRAYSTRICT |
|
STRUCT |
|
DATETIMEISO8601 |
|
BASE64 |
|
NULLVALUE |
|
TIMESTAMP |
|
Methods
static bool
validate(mixed $data, string $type, callable $filter = null)
Generic validator.
static bool
validateString(mixed $data, callable $filter = null)
String validator.
static bool
validateBoolean(mixed $data, callable $filter = null)
Bool validator.
static bool
validateInteger(mixed $data, callable $filter = null)
Int validator.
static bool
validateNumeric(mixed $data, callable $filter = null)
Numeric validator.
static bool
validateFloat(mixed $data, callable $filter = null)
Float validator.
static bool
validateJson(mixed $data, callable $filter = null)
Json validator.
static bool
validateSerialized(mixed $data, callable $filter = null)
Serialized values validator.
static bool
validateArray(mixed $data, callable $filter = null)
Array (strict) validator.
static bool
validateStruct(mixed $data, callable $filter = null)
Struct (strict) validator.
static bool
validateDatetimeIso8601(mixed $data, callable $filter = null)
Iso8601-datetime validator.
static bool
validateBase64(mixed $data, callable $filter = null)
Base64 validator.
static bool
validateNull(mixed $data, callable $filter = null)
Null value validator.
static bool
validateTimestamp(mixed $data, callable $filter = null)
Timestamp (epoch) validator.
Details
at line 69
static bool
validate(mixed $data, string $type, callable $filter = null)
Generic validator.
at line 88
static bool
validateString(mixed $data, callable $filter = null)
String validator.
at line 100
static bool
validateBoolean(mixed $data, callable $filter = null)
Bool validator.
at line 112
static bool
validateInteger(mixed $data, callable $filter = null)
Int validator.
at line 124
static bool
validateNumeric(mixed $data, callable $filter = null)
Numeric validator.
at line 136
static bool
validateFloat(mixed $data, callable $filter = null)
Float validator.
at line 148
static bool
validateJson(mixed $data, callable $filter = null)
Json validator.
at line 161
static bool
validateSerialized(mixed $data, callable $filter = null)
Serialized values validator.
at line 174
static bool
validateArray(mixed $data, callable $filter = null)
Array (strict) validator.
at line 187
static bool
validateStruct(mixed $data, callable $filter = null)
Struct (strict) validator.
at line 201
static bool
validateDatetimeIso8601(mixed $data, callable $filter = null)
Iso8601-datetime validator.
at line 213
static bool
validateBase64(mixed $data, callable $filter = null)
Base64 validator.
at line 226
static bool
validateNull(mixed $data, callable $filter = null)
Null value validator.
at line 237
static bool
validateTimestamp(mixed $data, callable $filter = null)
Timestamp (epoch) validator.