From e738786df7b1cd98a029b7385d0a1a91beca55e5 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 28 Nov 2024 09:39:58 +0100 Subject: [PATCH] favor "data-foundation-validation" over the deprecated "foundation-validation" compare tag name always in lower case --- .../app-root/clientlibs/authoring/dialog/js/validation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app-root/clientlibs/authoring/dialog/js/validation.js b/src/main/webapp/app-root/clientlibs/authoring/dialog/js/validation.js index 1fc3fbe9..dff3e74d 100644 --- a/src/main/webapp/app-root/clientlibs/authoring/dialog/js/validation.js +++ b/src/main/webapp/app-root/clientlibs/authoring/dialog/js/validation.js @@ -42,7 +42,7 @@ // predefined "responsiveWidths" pattern validator foundationValidator.register('foundation.validation.validator', { - selector: '[data-validation="wcmio.handler.media.responsiveWidths"]', + selector: '[data-foundation-validation="wcmio.handler.media.responsiveWidths"]', validate: function(el) { var value = getValue(el); var valid = value.length === 0 || pattern.responsiveWidths.test(value); @@ -54,10 +54,10 @@ // validates valid media format for asset picker foundationValidator.register('foundation.validation.validator', { - selector: '[data-validation="wcmio.handler.media.mediaFormat"]', + selector: '[data-foundation-validation="wcmio.handler.media.mediaFormat"]', validate: function(el) { var nextSibling = el.nextSibling; - if (nextSibling && nextSibling.tagName === 'coral-alert') { + if (nextSibling && nextSibling.tagName.toLowerCase() === 'coral-alert') { return nextSibling.textContent; } }