You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by me...@apache.org on 2018/12/19 11:51:24 UTC
[ranger] 34/39: RANGER-2294:Front-end and back-end email address
regular expression should be the same
This is an automated email from the ASF dual-hosted git repository.
mehul pushed a commit to branch ranger-1.1
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 4dc2fda26c135c259a62cc580040c8cc51966239
Author: zhangqiang2 <zh...@zte.com.cn>
AuthorDate: Wed Nov 28 16:10:05 2018 +0800
RANGER-2294:Front-end and back-end email address regular expression should be the same
Signed-off-by: peng.jianhua <pe...@zte.com.cn>
---
.../src/main/webapp/scripts/modules/globalize/message/en.js | 1 +
security-admin/src/main/webapp/scripts/views/users/UserForm.js | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index 2c0ee98..34e3387 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -469,6 +469,7 @@ define(function(require) {
lastNameValidationMsg :'1. Last name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ._-@ and space. <br>3. Name length should be greater than one.',
setTimeZoneErrorMsg :'Please select Start/End date for Time zone',
jsValidationMsg :'1. JavaScript Condition Examples :\ncountry_code == \'USA\', time_range >= 900 && time_range <= 1800 etc.\n2. Dragging bottom-right corner of javascript condition editor(Textarea) can resizable',
+ emailAddressValidationMsg :'1. Email address should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character <b>.-@</b> .<br>3. Email address length should be greater than 9 characters.<br> 4. Email address examples : abc@de.fg, A-C@D-.FG',
},
serverMsg : {
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserForm.js b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
index ee0d256..b11264f 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
@@ -105,9 +105,11 @@ define(function(require){
errorMsg :localization.tt('validationMessages.lastNameValidationMsg'),
},
emailAddress : {
- type : 'Text',
+ type : 'TextFieldWithIcon',
title : localization.tt("lbl.emailAddress"),
- validators : ['email']
+ validators : [{type:'regexp',regexp:/^[\w]([\-\.\w])+[\w]+@[\w]+[\w\-]+[\w]*\.([\w]+[\w\-]+[\w]*(\.[a-z][a-z|0-9]*)?)$/,
+ message :'Invalid email address'}],
+ errorMsg :localization.tt('validationMessages.emailAddressValidationMsg'),
},
userRoleList : {
type : 'Select',