Skip to content

Commit

Permalink
move regex pattern for validation above function
Browse files Browse the repository at this point in the history
  • Loading branch information
BrittanyIRL committed Aug 14, 2020
1 parent d91058f commit 2d7fdf0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

0 comments on commit 2d7fdf0

Please sign in to comment.