Fix: Validation of email addresses now case insensitive.

This commit is contained in:
Andreas Baldeau 2014-12-31 13:46:10 +01:00
parent 667cf6e20f
commit 5420cb81e7

View file

@ -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: {