prevent search form submiting with not enougth arguments
This commit is contained in:
@@ -109,6 +109,9 @@ class EdlpSearchForm extends FormBase {
|
||||
*/
|
||||
public function validateForm(array &$form, FormStateInterface $form_state) {
|
||||
parent::validateForm($form, $form_state);
|
||||
// if (strlen($form_state->getValue('keys')) < 3) {
|
||||
// $form_state->setErrorByName('keys', $this->t('Search string is to short. Please enter more than 3 characters.'));
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user