I have three fields: 1. Day 2. Month and 3. Year. How cand I build a zend Validator that checks for incorect formats like 30 february, 31 april and even leap years.
This is the form my validation is built in the controller:
$validators = array(
"*" => array("allowEmpty" => true),
"user_status" => array("presence" => "required"),
"fname" => array("presence" => "required"),
"lname" => array("presence" => "required"),
"tel_num" => array(
'digits',
array("StringLength", "minLength" => 8, "maxLength" => 15),
new Zend_Validate_Db_NoRecordExists('usersmeta','meta_value'),
),
"allowEmpty" => false
),