You are here

function _webform_validate_email in Webform 7.4

Same name and namespace in other branches
  1. 5.2 components/email.inc \_webform_validate_email()
  2. 5 components/email.inc \_webform_validate_email()
  3. 6.3 components/email.inc \_webform_validate_email()
  4. 6.2 components/email.inc \_webform_validate_email()
  5. 7.3 components/email.inc \_webform_validate_email()

A Drupal Form API Validation function.

Validates the entered values from email components on the client-side form. Calls a form_set_error if the e-mail is not valid.

Parameters

array $form_element: The e-mail form element.

array $form_state: The full form state for the webform.

1 string reference to '_webform_validate_email'
_webform_render_email in components/email.inc
Implements _webform_render_component().

File

components/email.inc, line 253
Webform module email component.

Code

function _webform_validate_email($form_element, &$form_state) {
  $component = $form_element['#webform_component'];
  $format = webform_variable_get('webform_email_address_format') == 'long' ? $component['extra']['format'] : 'short';
  webform_email_validate($form_element['#value'], implode('][', $form_element['#parents']), TRUE, $component['extra']['multiple'], FALSE, $format);
}