public static FormElement::processPattern(&$element, FormStateInterface $form_state, &$complete_form)
#process callback for #pattern form element property.
array $element: An associative array containing the properties and children of the generic input element.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
array $complete_form: The complete form structure.
array The processed element.
public static function processPattern(&$element, FormStateInterface $form_state, &$complete_form) { if (isset($element['#pattern']) && !isset($element['#attributes']['pattern'])) { $element['#attributes']['pattern'] = $element['#pattern']; $element['#element_validate'][] = array(get_called_class(), 'validatePattern'); } return $element; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!FormElement.php/function/FormElement::processPattern/8.1.x