From 0857dfe88a28488405441c9d3e1396240bd32a75 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Sat, 15 Jun 2024 14:26:41 +1000 Subject: [PATCH 1/2] Fix an error where min/max links are validated for non-multi link fields --- src/fields/HyperField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/HyperField.php b/src/fields/HyperField.php index ffa48bd..4880892 100644 --- a/src/fields/HyperField.php +++ b/src/fields/HyperField.php @@ -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, From bf90236521cdc41e3b271c06afc2998327b0ba1a Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Sat, 15 Jun 2024 14:52:50 +1000 Subject: [PATCH 2/2] version 1.1.32 --- CHANGELOG.md | 14 ++++++++++++++ composer.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4075244..6fbbc12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.1.32 - 2024-06-15 + +### Added +- Add `Link::lowerDisplayName`. + +### Changed +- Change `Link::lowerDisplayName` to `Link::lowerClassDisplayName`. +- Change `Link::displayNameSlug` to `Link::classDisplayNameSlug`. + +### Fixed +- Fix an error where min/max links are validated for non-multi link fields. +- Fix an error for not handling invalid link content correctly. +- Fix some JS not initializing for some fields when switching link types. + ## 1.1.31 - 2024-05-31 ### Changed diff --git a/composer.json b/composer.json index fb9a579..ab06136 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "verbb/hyper", "description": "A user-friendly links field for Craft.", "type": "craft-plugin", - "version": "1.1.31", + "version": "1.1.32", "keywords": [ "craft", "cms",