From 508be0805553e1ec3d03fac2f488d310961b05b1 Mon Sep 17 00:00:00 2001 From: greymoth <246701683+greymoth-jp@users.noreply.github.com> Date: Tue, 30 Jun 2026 02:33:31 +0900 Subject: [PATCH] fix(isAlphanumeric): include accented Greek letters for el-GR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The el-GR alpha class was extended to [Α-ώ] in #1238 to accept accented letters, but the sibling alphanumeric class still ends at ω ([Α-ω]). As a result isAlphanumeric rejects ό/ύ/ώ (and Ό/Ύ/Ώ) for el-GR while isAlpha accepts them. Match the range so the alphanumeric letter set equals the alpha set plus digits. --- src/lib/alpha.js | 2 +- test/validators.test.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/alpha.js b/src/lib/alpha.js index 6f58c9aee..7d2d5fe6e 100644 --- a/src/lib/alpha.js +++ b/src/lib/alpha.js @@ -54,7 +54,7 @@ export const alphanumeric = { 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, 'da-DK': /^[0-9A-ZÆØÅ]+$/i, 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, - 'el-GR': /^[0-9Α-ω]+$/i, + 'el-GR': /^[0-9Α-ώ]+$/i, 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i, 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, diff --git a/test/validators.test.js b/test/validators.test.js index 9c867efae..7e41ecde8 100644 --- a/test/validators.test.js +++ b/test/validators.test.js @@ -2846,6 +2846,8 @@ describe('Validators', () => { valid: [ 'αβγδεζηθικλμνξοπρςστυφχψω', 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ', + 'άέήίΰϊϋόύώ', + 'ΆΈΉΊΪΫΎΏ', '20θ', '1234568960', ],