diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 5452b71472086a8acc275f9d5414f93a43cefe63..5a5f0baeb48e85a641b13f4864b8c11e4cff4c18 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1011,10 +1011,9 @@ class SelectionField extends FormField { parent::validateEntry($entry); if (!$this->errors()) { $config = $this->getConfiguration(); - if (!$entry || count($entry) == 0) - $this->_errors[] = __('Select a value from the list'); - elseif ($config['typeahead'] - && !in_array($this->getWidget()->getEnteredValue(), $entry)) + if ($config['typeahead'] + && ($entered = $this->getWidget()->getEnteredValue()) + && !in_array($entered, $entry)) $this->_errors[] = __('Select a value from the list'); } }