From e421f67a065dd77f6c12e739385525de4681d03e Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 28 Nov 2024 09:56:56 +0100 Subject: [PATCH] GraniteUI validator: Use data-foundation-validation instead of data-validation HTML attribute (#74) --- changes.xml | 3 +++ .../app-root/clientlibs/authoring/dialog/js/validation.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changes.xml b/changes.xml index 2a12de3f..43bc51f1 100644 --- a/changes.xml +++ b/changes.xml @@ -33,6 +33,9 @@ Dynamic Media with OpenAPI: Respect Image Dimension from SVG asset metadata. + + GraniteUI validator: Use data-foundation-validation instead of data-validation HTML attribute, the latter is deprecated. + 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 3fbe07a4..eb4cd1aa 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);