function acquia_lift_element_variation_details_form_validate in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift.admin.unibar.inc \acquia_lift_element_variation_details_form_validate()
Form validation handler for acquia_lift_element_variation_details_form.
File
Code
function acquia_lift_element_variation_details_form_validate($form, &$form_state) {
module_load_include('inc', 'personalize_elements', 'personalize_elements.admin');
if (!personalize_elements_selector_validate($form_state['values']['selector'])) {
form_set_error('selector', t('The selector cannot contain tags.'));
}
$filtered = personalize_elements_filter_personalize_element_option($form_state['values']['variation_type'], $form_state['values']['personalize_elements_content']);
if ($filtered !== $form_state['values']['personalize_elements_content']) {
$form_state['values']['personalize_elements_content'] = $filtered;
drupal_set_message(t('Disallowed HTML tags were removed from the variation.'), 'warning');
}
}