public function TestEnvironment::frontEndEnvironmentFormValidate in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 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 72
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.'));
}
}