Skip to content

Commit 8e201d6

Browse files
committed
Fixed bug when choice is empty and field is not required
1 parent 0658943 commit 8e201d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fields/ChoiceField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function validate($value)
4444
{
4545
parent::validate($value);
4646

47-
if ($this->isEmpty($value) || !$this->validValue($value)) {
47+
if (!$this->validValue($value)) {
4848
$error_message = PHPFormConfig::getIMessage("INVALID_CHOICE");
4949

5050
if (is_array($value)) {

0 commit comments

Comments
 (0)