public static function PasswordConfirm::validatePasswordConfirm in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/PasswordConfirm.php \Drupal\webform\Plugin\WebformElement\PasswordConfirm::validatePasswordConfirm()
Form API callback. Convert password confirm array to single value.
File
- src/
Plugin/ WebformElement/ PasswordConfirm.php, line 88
Class
- PasswordConfirm
- Provides a 'password_confirm' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public static function validatePasswordConfirm(array &$element, FormStateInterface $form_state, array &$completed_form) {
$value = $element['#value'];
$form_state
->setValueForElement($element, $value['pass1']);
}