Validator
Function: validator
Visibility: public
Parameter: validator($string,$type)
Description:
Validates a string with selected type of test.
Parameters:
(optional) - string - $string - The string to validate.
(optional) - string - $type - The type of test we want to run on the $string, such as: any kind of integer / varchar / characters / filename / url / email / ip / date / xss check.
Return:
string - The string after the validation - If test was negative, the string will be wiped, unless we chose: varchar / xss - It will return the filtered value of string.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
Let's validate a string.
How to call (example):
Possible outcome (example):
Output: