diff --git a/validation/dist/cjs/isRgbaString.js b/validation/dist/cjs/isRgbaString.js index 3f594c6..c8d3106 100644 --- a/validation/dist/cjs/isRgbaString.js +++ b/validation/dist/cjs/isRgbaString.js @@ -6,6 +6,6 @@ const isRgbaString = (rgba) => { return false; // source: https://rgxdb.com/r/GFYPX74 const regex = /rgba\(\s*(-?\d+|-?\d*\.\d+(?=%))(%?)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/; - return regex.test(rgba); + return regex.test(rgba.toLowerCase().replace(/ +/g, "")); }; exports.isRgbaString = isRgbaString; diff --git a/validation/dist/mjs/isRgbaString.js b/validation/dist/mjs/isRgbaString.js index 6300746..62dd1f9 100644 --- a/validation/dist/mjs/isRgbaString.js +++ b/validation/dist/mjs/isRgbaString.js @@ -3,5 +3,5 @@ export const isRgbaString = (rgba) => { return false; // source: https://rgxdb.com/r/GFYPX74 const regex = /rgba\(\s*(-?\d+|-?\d*\.\d+(?=%))(%?)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*\.\d+(?=%))(\2)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/; - return regex.test(rgba); + return regex.test(rgba.toLowerCase().replace(/ +/g, "")); }; diff --git a/validation/package.json b/validation/package.json index 5e72e23..302c45f 100644 --- a/validation/package.json +++ b/validation/package.json @@ -1,6 +1,6 @@ { "name": "@nzz/et-utils-validation", - "version": "1.0.0", + "version": "1.0.1", "description": "Library containing validator functions", "repository": { "type": "git",