Hello,
I have built a custom form.. When I tried to put validation I am not able to retain the posted values after the validation is fired. Various sites recommended the use of NetefxValidator module. However, I tried to create my own library for validation but NetefxValidatorRuleFUNCTION returns null. Please help.
Following is what i did in my code:
As per the documentation, I created a class file MyLibrary.php in mysite/code
$rule_startTime_Max = new NetefxValidatorRuleFUNCTION ("StartTime", "Start time cannot be greater than end time", 'error',array('MyLibrary', 'startTimeLessThanEndTime', array()))
class MyLibrary {
public static function startTimeLessThanEndTime($data, $args) {
return true;
}
}
But the validation is fired every time. Also I tried print_r($data);exit(); but NetefxValidatorRuleFUNCTION .php
return call_user_func_array($function, $params);
always returns null...