function form_validate_email in Form Builder 7
Same name and namespace in other branches
- 6 form_builder.module \form_validate_email()
- 7.2 form_builder.module \form_validate_email()
Generic validation function to check for a valid e-mail value.
File
- ./
form_builder.module, line 398 - form_builder.module Generic form building framework and user interface.
Code
function form_validate_email(&$element, &$form_state) {
if (empty($element['#value'])) {
return;
}
if (!valid_email_address($element['#value'])) {
form_error($element, t('The %title field value must be a valid e-mail address.', array(
'%title' => $element['#title'],
)));
}
}