Skip to content

Commit

Permalink
Fix an error where min/max links are validated for non-multi link fields
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jun 15, 2024
1 parent f261547 commit 0857dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/HyperField.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public function validateBlocks(ElementInterface $element): void
}
}

if ($this->minLinks || $this->maxLinks) {
if ($this->multipleLinks && ($this->minLinks || $this->maxLinks)) {
$arrayValidator = new ArrayValidator([
'min' => $this->minLinks ?: null,
'max' => $this->maxLinks ?: null,
Expand Down

0 comments on commit 0857dfe

Please sign in to comment.