You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
514 B
23 lines
514 B
<?php
|
|
/* For licensing terms, see /license.txt */
|
|
/** @author Bart Mollet, Julio Montoya */
|
|
require_once 'HTML/QuickForm/Rule.php';
|
|
|
|
/**
|
|
* Class HTML_QuickForm_Rule_Date
|
|
*/
|
|
class HTML_QuickForm_Rule_Date extends HTML_QuickForm_Rule
|
|
{
|
|
/**
|
|
* Check a date
|
|
* @see HTML_QuickForm_Rule
|
|
* @param string $date example 2014-04-30
|
|
* @param array $options
|
|
*
|
|
* @return boolean True if date is valid
|
|
*/
|
|
public function validate($date, $options)
|
|
{
|
|
return api_is_valid_date($date, 'Y-m-d');
|
|
}
|
|
}
|
|
|