You are here

function field_default_token_remove_validation in Field default token 8

Same name and namespace in other branches
  1. 7 field_default_token.module \field_default_token_remove_validation()

Form element #after_build handler.

Disables field validation on Field UI forms for selectors, checkboxes and radio buttons.

1 string reference to 'field_default_token_remove_validation'
field_default_token_selection_element_value in ./field_default_token.module
Form element value callback.

File

./field_default_token.module, line 273
Enables to use tokens as field default values.

Code

function field_default_token_remove_validation($element, FormStateInterface $form_state) {
  unset($element['#needs_validation']);
  return $element;
}