From 5420cb81e7113aea23e6c7ca5f1bf164604f5bc8 Mon Sep 17 00:00:00 2001 From: Andreas Baldeau Date: Wed, 31 Dec 2014 13:46:10 +0100 Subject: [PATCH] Fix: Validation of email addresses now case insensitive. --- shared/validation/constraints.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shared/validation/constraints.js b/shared/validation/constraints.js index 9ad869a..72ce708 100644 --- a/shared/validation/constraints.js +++ b/shared/validation/constraints.js @@ -3,28 +3,28 @@ angular.module('ffffng').factory('Constraints', function () { return { token:{ - regex: /^[0-9a-fA-F]{16}$/, + regex: /^[0-9a-f]{16}$/i, optional: false }, node: { hostname: { - regex: /^[-a-zA-Z0-9_]{1,32}$/, + regex: /^[-a-z0-9_]{1,32}$/i, optional: false }, key: { - regex: /^([a-fA-F0-9]{64})$/, + regex: /^([a-f0-9]{64})$/i, optional: true }, email: { - regex: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/, + regex: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, optional: false }, nickname: { - regex: /^[-a-zA-Z0-9_ äöüÄÖÜß]{1,64}$/, + regex: /^[-a-z0-9_ äöüß]{1,64}$/i, optional: false }, mac: { - regex: /^([a-fA-F0-9]{12}|([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2})$/, + regex: /^([a-f0-9]{12}|([a-f0-9]{2}:){5}[a-f0-9]{2})$/i, optional: false }, coords: {