Some field types will not set the custom error message provided to #rules, example - the email type field.
So if i declare a field like this:
$form['email'] = array(
'#type' => 'textfield',
'#title' => t('Email'),
'#required' => TRUE,
'#rules' => array(
array('rule' => 'email', 'error' => t('Invalid email address')),
),
);
clientside validation will not display the custom error message - 'Invalid email address'
Comments
Comment #1
jelle_sFixed in the latest dev version (both 6 and 7)