我有三个领域:1。第2天。月和3年。我是如何建立一个zend Validator来检查像2月30日,4月31日甚至闰年那样的复杂格式。
这是我在控制器中构建验证的表单:
$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
),