[TYPO3-mvc] triggering errorClass for form elements from custom validators
Uwe Michelfelder
um at limeflavour.com
Fri Feb 26 16:06:54 CET 2010
hi list,
i'm validating some object properties with custom validators set in the
create and update actions.
i they fail, an errormessage is added an the action is redirected to the
form, showing the message.
BUT: the errorClass attributes of the not validated field does not
react! with standard validators they work.
this is my custom validator:
public function isValid($group)
{
// Format. Muss wie erster Teil einer E-Mail sein
if(!preg_match('/^[\w.+-]{2,}$/',$group->getEmail()))
{
return FALSE;
}
}
Template:
<f:form.textbox id="email" property="email" class="inputFifty"
errorClass="error"/>
More information about the TYPO3-project-typo3v4mvc
mailing list