protected function EmailVerification::valueValidate in User email verification 8
Validate the options form.
Overrides FilterPluginBase::valueValidate
File
- src/
Plugin/ views/ filter/ EmailVerification.php, line 199
Class
- EmailVerification
- Simple filter to handle matching of boolean values
Namespace
Drupal\user_email_verification\Plugin\views\filterCode
protected function valueValidate($form, FormStateInterface $form_state) {
if ($form_state
->getValue([
'options',
'value',
]) == 'All' && !$form_state
->isValueEmpty([
'options',
'expose',
'required',
])) {
$form_state
->setErrorByName('value', $this
->t('You must select a value unless this is an non-required exposed filter.'));
}
}