You are here

clientside_validation_email.module in Clientside Validation 7.2

File

clientside_validation_email/clientside_validation_email.module
View source
<?php

/**
 * Implements hook_ctools_plugin_directory().
 */
function clientside_validation_email_ctools_plugin_directory($module, $plugin) {
  if ($module == 'clientside_validation') {
    return 'plugins/' . $plugin;
  }
}

/**
 * Implements hook_field_widget_form_alter().
 */
function clientside_validation_email_field_widget_form_alter(&$element, &$form_state, $context) {
  switch ($context['field']['type']) {
    case 'email':
      $element['email']['#clientside_validation_type'] = 'email';
      break;
  }
}