Skip to content

Commit

Permalink
FIX Add extraEmptyValues to TreedropdownField
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 8, 2023
1 parent 0ac8499 commit 3518887
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Forms/TreeDropdownField.php
Original file line number Diff line number Diff line change
Expand Up @@ -984,4 +984,16 @@ public function setShowSelectedPath($showSelectedPath)
$this->showSelectedPath = $showSelectedPath;
return $this;
}

/**
* @return array
*/
public function getSchemaValidation()
{
$validationList = parent::getSchemaValidation();
if (array_key_exists('required', $validationList)) {
$validationList['required'] = ['extraEmptyValues' => ['0']];
}
return $validationList;
}
}

0 comments on commit 3518887

Please sign in to comment.