Commit 61dcfb12 authored by Robert Anderson's avatar Robert Anderson
Browse files

Added vtype: usernameRadius

Added maskRe: usernameRadiusPartRe
parent b25a665c
......@@ -9,6 +9,9 @@ var emailAddressRe = /[a-z0-9\._\+&@\-]/;
// Typical username
var usernamePartRe = /[a-z0-9\._]/;
// Radius username allows @
var usernameRadiusPartRe = /[a-z0-9\._\-@]/;
// username
var usernameRe = /[a-z0-9\._\-]/;
......@@ -37,6 +37,13 @@ Ext.apply(Ext.form.VTypes, {
'usernameText': "This is not a valid username",
'usernameRadius': function(v) {
var usernameRadiusMask = /^[a-z0-9\._\-@]+$/;
return usernameRadiusMask.test(v);
},
'usernameRadiusText': "This is not a valid username",
'emailAddress': function(v) {
var emailAddressMask = /^[a-z0-9\._\-\+&]+@[a-z0-9]+[a-z0-9\-]*(\.[a-z0-9\-]+)+$/;
return emailAddressMask.test(v);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment