You can validate email, string, array and others.
$res = Valid::email('solital@email.com');
/* Return `string` if true or `null` if false */
pre($res);
You can validate whether a number is int
orfloat
.
$res = Valid::number(12.5);
/* Return `int` or `float` if true or `null` if false */
pre($res);
$res = Valid::isNull(null);
/* Return bool */
pre($res);
You can validate a string if it is lowercase. If not, the isLower
method will
convert the string to lowercase.
$res = Valid::isLower('SOLITAL');
/* Return string */
pre($res);
You can validate a string if it is uppercase. If not, the isUpper
method will
convert the string to uppercase.
$res = Valid::isUpper('solital');
/* Return string */
pre($res);
Checks whether a variable is Base64-type encryption.
$hash = base64_encode("test");
$res = Valid::isBase64($hash);
/* Return bool */
pre($res);
Checks if one variable is identical to another.
$res = Valid::identical("foo", "foo");
/* Return bool */
pre($res);