You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pe...@apache.org on 2018/12/12 01:09:52 UTC

ranger git commit: RANGER-2294:Front-end and back-end email address regular expression should be the same

Repository: ranger
Updated Branches:
  refs/heads/master 6b9442959 -> 8f2337d3d


RANGER-2294:Front-end and back-end email address regular expression should be the same

Signed-off-by: peng.jianhua <pe...@zte.com.cn>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/8f2337d3
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/8f2337d3
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/8f2337d3

Branch: refs/heads/master
Commit: 8f2337d3dee43942f30068e401efa65cabfa32f8
Parents: 6b94429
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Wed Nov 28 16:10:05 2018 +0800
Committer: peng.jianhua <pe...@zte.com.cn>
Committed: Wed Dec 12 09:09:25 2018 +0800

----------------------------------------------------------------------
 .../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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/8f2337d3/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
----------------------------------------------------------------------
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 : {
 

http://git-wip-us.apache.org/repos/asf/ranger/blob/8f2337d3/security-admin/src/main/webapp/scripts/views/users/UserForm.js
----------------------------------------------------------------------
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',