From 2d7fdf08439ebe2bb6969e083f91b1ca09c294ac Mon Sep 17 00:00:00 2001 From: Brittany Feenstra Date: Tue, 11 Aug 2020 10:46:11 -0700 Subject: [PATCH] move regex pattern for validation above function --- assets/src/dashboard/utils/validateGoogleAnalyticsIdFormat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/src/dashboard/utils/validateGoogleAnalyticsIdFormat.js b/assets/src/dashboard/utils/validateGoogleAnalyticsIdFormat.js index 081ed335df18..5f7abef2c9d1 100644 --- a/assets/src/dashboard/utils/validateGoogleAnalyticsIdFormat.js +++ b/assets/src/dashboard/utils/validateGoogleAnalyticsIdFormat.js @@ -14,7 +14,8 @@ * limitations under the License. */ +const googleAnalyticsIdFormatRegex = /^ua-\d+-\d+$/; + export default function validateGoogleAnalyticsIdFormat(value = '') { - const googleAnalyticsIdFormatRegex = /^ua-\d+-\d+$/; return Boolean(value.toLowerCase().match(googleAnalyticsIdFormatRegex)); }