* @access public
* @return bool
*/
- function validate($nombre, $valor, $formato = '')
+ function validate($valor, $nombre, $formato = '')
{
- $tmp = $valor['F'].'-'.$valor['d'].'-'.$valor['Y'];
- return Validate::date($tmp, array('format' => '%Y-%m-%d'));
+ if ($valor['Y'] != '--' && $valor['d'] != '--' && $valor['m'] != '--') {
+ return Validate::date($valor['Y'].'-'.$valor['d'].'-'.$valor['F'], array('format' => '%Y-%m-%d'));
+ }
+ else {
+ return false;
+ }
} // end func validate
}
?>