Validate Length
Function: validateLength
Visibility: public
Parameter: validateLength($returnDescription)
Description:
For validate strings by length.
Parameters:
(required) - string - $string - The string to test.
(optional) - int|false - $minLength - The minmum length the string can be.
(optional) - int|false - $maxLength - The maximum length the string can be.
Return:
string - If string passed the test it will return the string, if the test was a failure, the result will be empty.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to check if the string is ok for our requirements.
How to call (example):
Possible outcome (example):
Output: