public function TestEnvironment::frontEndEnvironmentFormValidate in Build Hooks 8.2
Same name and namespace in other branches
- 3.x tests/modules/build_hooks_test/src/Plugin/FrontendEnvironment/TestEnvironment.php \Drupal\build_hooks_test\Plugin\FrontendEnvironment\TestEnvironment::frontEndEnvironmentFormValidate()
Overrides FrontendEnvironmentBase::frontEndEnvironmentFormValidate
File
- tests/
modules/ build_hooks_test/ src/ Plugin/ FrontendEnvironment/ TestEnvironment.php, line 70
Class
- TestEnvironment
- Defines a test environment plugin.
Namespace
Drupal\build_hooks_test\Plugin\FrontendEnvironmentCode
public function frontEndEnvironmentFormValidate($form, FormStateInterface $form_state) {
parent::frontEndEnvironmentFormValidate($form, $form_state);
$whiz = $form_state
->getValue('whiz');
if (strlen($whiz) < 3) {
$form_state
->setErrorByName('whiz', $this
->t('Whiz must contains minimum 3 characters.'));
}
}