As the name says, it is made to be basic and direct.
Validator Class
| Name | Description | |——|————-| |__construct|Function __construct| |bool|Function bool| |boolean|Function boolean| |compareHash|Function compareHash| |confirmPass|Function confirmPass| |email|Function email| |endWith|Function endWith| |execMethod|Function execMethod| |exists|Function exists| |float|Function float| |flt|Function flt Another alternative to the float function| |has|Function has| |hasKey|Function hasKey| |int|Function int Another alternative to the integer function| |integer|Function integer| |isNull|Function isNull| |max|Function max| |maxCount|Function maxcount| |maxLen|Function maxlen| |min|Function min| |minCount|Function mincount| |minLen|Function minLen| |noExists|Function noexists| |noIsNull|Function noIsNull| |startWith|Function startWith| |str|Function str Another alternative to the string function| |string|Function string| |url|Function url| |validArray|Function validArray| |validString|Function validString| |validate|Function validate Validate a string or array as first param, with regex as second params
Validations
- bool
- boolean
- compareHash
- confirmPass
- endWith
- execMethod
- exists
- float
- flt
- has
- hasKey
- int
- integer
- isNull
- maxCount
- maxLen
- minCount
- minLen
- min
- max
- noExists
- noIsNull
- startWith
- str
- string
- url Using Validations ```php $result = Validator::validate(“My Text”, “string|minLen:6”); //$result = true;|
Description
public __construct (string $class)
Function __construct
Parameters
(string) $class
Return Values
void
Description
public bool (mixed $arg)
Function bool
Parameters
(mixed) $arg
Return Values
object
Description
public boolean (mixed $arg)
Function boolean
Parameters
(mixed) $arg
Return Values
object
Description
public compareHash (mixed $arg)
Function compareHash
Parameters
(mixed) $arg
Return Values
object
Description
public confirmPass (array $arg)
Function confirmPass
Parameters
(array) $arg
Return Values
object
Description
public email (mixed $arg)
Function email
Parameters
(mixed) $arg
Return Values
object
Description
public endWith (mixed $arg)
Function endWith
Parameters
(mixed) $arg
Return Values
object
Description
public execMethod (string $method, mixed $arg)
Function execMethod
Parameters
(string) $method
(mixed) $arg
Return Values
bool
Description
public exists (array $arg)
Function exists
Parameters
(array) $arg
Return Values
object
Description
public float (mixed $arg)
Function float
Parameters
(mixed) $arg
Return Values
object
Description
public flt (mixed $arg)
Function flt Another alternative to the float function
Parameters
(mixed) $arg
Return Values
object
Description
public has (mixed $arg)
Function has
Parameters
(mixed) $arg
Return Values
object
Description
public hasKey (mixed $arg)
Function hasKey
Parameters
(mixed) $arg
Return Values
object
Description
public int (mixed $arg)
Function int Another alternative to the integer function
Parameters
(mixed) $arg
Return Values
object
Description
public integer (mixed $arg)
Function integer
Parameters
(mixed) $arg
Return Values
object
Description
public isNull (mixed $arg)
Function isNull
Parameters
(mixed) $arg
Return Values
object
Description
public max (string|array $arg)
Function max
Parameters
(string|array) $arg
Return Values
object
Description
public maxCount (mixed $arg)
Function maxcount
Parameters
(mixed) $arg
Return Values
object
Description
public maxLen (mixed $arg)
Function maxlen
Parameters
(mixed) $arg
Return Values
object
Description
public min (string|array $arg)
Function min
Parameters
(string|array) $arg
Return Values
object
Description
public minCount (mixed $arg)
Function mincount
Parameters
(mixed) $arg
Return Values
object
Description
public minLen (mixed $arg)
Function minLen
Parameters
(mixed) $arg
Return Values
object
Description
public noExists (array $arg)
Function noexists
Parameters
(array) $arg
Return Values
object
Description
public noIsNull (mixed $arg)
Function noIsNull
Parameters
(mixed) $arg
Return Values
object
Description
public startWith (mixed $arg)
Function startWith
Parameters
(mixed) $arg
Return Values
object
Description
public str (mixed $arg)
Function str Another alternative to the string function
Parameters
(mixed) $arg
Return Values
object
Description
public string (mixed $arg)
Function string
Parameters
(mixed) $arg
Return Values
object
Description
public url (mixed $arg)
Function url
Parameters
(mixed) $arg
Return Values
object
Description
public validArray (array $data, array $validations)
Function validArray
Parameters
(array) $data
(array) $validations
Return Values
object
Description
public validString (string $data, string $validations)
Function validString
Parameters
(string) $data
(string) $validations
Return Values
void
Description
public static validate (string|array $data, string|array $validations, string $class)
Function validate Validate a string or array as first param, with regex as second params
Validations
- bool
- boolean
- compareHash
- confirmPass
- endWith
- execMethod
- exists
- float
- flt
- has
- hasKey
- int
- integer
- isNull
- maxCount
- maxLen
- minCount
- minLen
- min
- max
- noExists
- noIsNull
- startWith
- str
- string
- url Using Validations ```php $result = Validator::validate(“My Text”, “string|minLen:6”); //$result = true;
$result = Validator::validate(“My Text”, “string|minLen:2|maxLen:4”);
//$result = false;
Parameters
(string|array) $data
(string|array) $validations
(string) $class
Return Values
bool