LSattr_html :: date : fix default form rule parameters

This commit is contained in:
Benjamin Renard 2017-10-12 14:49:24 +02:00
parent be9eef7959
commit 0f55f821c6

View file

@ -40,10 +40,8 @@ class LSattr_html_date extends LSattr_html {
*/ */
function addToForm (&$form,$idForm,$data=NULL) { function addToForm (&$form,$idForm,$data=NULL) {
$element = parent::addToForm($form,$idForm,$data); $element = parent::addToForm($form,$idForm,$data);
$form -> addRule($this -> name, 'date', array('format' => $element -> getFormat()) ); $form -> addRule($this -> name, 'date', array('msg' => _('Invalid value'), 'params' => array('format' => $element -> getFormat())) );
return $element; return $element;
} }
} }
?>