From c1a28fef4097b5b5bd3f1c7c45f4140d82f65f1e Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Fri, 11 Oct 2019 13:28:03 -0700 Subject: [PATCH] fix(core/presentation): Do not use a regexp with /test/s because it's not supported in firefox (#7518) --- .../core/src/presentation/forms/validation/categories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/modules/core/src/presentation/forms/validation/categories.ts b/app/scripts/modules/core/src/presentation/forms/validation/categories.ts index be4c5b6db50..bdd0947c126 100644 --- a/app/scripts/modules/core/src/presentation/forms/validation/categories.ts +++ b/app/scripts/modules/core/src/presentation/forms/validation/categories.ts @@ -38,7 +38,7 @@ export const warningMessage = buildCategoryMessage('warning'); // A regular expression which captures the category label and validation message from a validation message // I.e., for the string: "Error: There was a fatal error" // this captures "Error" and "There was a fatal error" -const validationMessageRegexp = new RegExp(`^(${labels.join('|')}): (.*)$`, 'sm'); +const validationMessageRegexp = new RegExp(`^(${labels.join('|')}): ((?:[\r\n]|.)*)$`, 'm'); // Takes an errorMessage with embedded category and extracts the category and message // Example: "Error: there was an error" => ['error', 'there was an error']