protected function EncryptionProfileForm::moveFormStateErrors in Encrypt 8.3
Moves form errors from one form state to another.
Parameters
\Drupal\Core\Form\FormStateInterface $from: The form state object to move from.
\Drupal\Core\Form\FormStateInterface $to: The form state object to move to.
1 call to EncryptionProfileForm::moveFormStateErrors()
- EncryptionProfileForm::validateForm in src/
Form/ EncryptionProfileForm.php - Form validation handler.
File
- src/
Form/ EncryptionProfileForm.php, line 386
Class
- EncryptionProfileForm
- Provides the form to add / edit an EncryptionProfile entity.
Namespace
Drupal\encrypt\FormCode
protected function moveFormStateErrors(FormStateInterface $from, FormStateInterface $to) {
foreach ($from
->getErrors() as $name => $error) {
$to
->setErrorByName($name, $error);
}
}