prevent search form submiting with not enougth arguments

This commit is contained in:
2018-11-26 12:56:26 +01:00
parent 3aa6de7439
commit 88c72878f4
3 changed files with 15 additions and 6 deletions
@@ -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.'));
// }
}
/**