From ebdba19041023b127c2f642b16350ebbfaffecc0 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Sat, 7 Jan 2017 08:04:48 +0530 Subject: [PATCH] IOTS-120 : Fixing firstName and lastName cannot contain whitespaces --- .../resources/jaggeryapps/devicemgt/app/conf/config.json | 4 ++-- .../devicemgt/app/pages/cdmf.page.register/register.hbs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 442d77d41b..8b923a9b82 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -35,9 +35,9 @@ "usernameJSRegEx" : "^[\\S]{3,30}$", "usernameRegExViolationErrorMsg" : "Provided username is invalid.", "usernameHelpMsg" : "Should be in minimum 3 characters long and do not include any whitespaces.", - "firstnameJSRegEx" : "^[\\S]{3,30}$", + "firstnameJSRegEx" : "^.{3,30}$", "firstnameRegExViolationErrorMsg" : "Provided first name is invalid.", - "lastnameJSRegEx" : "^[\\S]{3,30}$", + "lastnameJSRegEx" : "^.{3,30}$", "lastnameRegExViolationErrorMsg" : "Provided last name is invalid.", "emailJSRegEx" : "/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/", "emailRegExViolationErrorMsg" : "Provided email is invalid." diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.register/register.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.register/register.hbs index 5544708f93..d105c30ec2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.register/register.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.register/register.hbs @@ -25,14 +25,14 @@
+ data-regex="{{firstnameJSRegEx}}" data-lengthmsg="{{usernameHelpText}}" + data-errormsg="{{firstnameRegExViolationErrorMsg}}"/>
+ data-regex="{{lastnameJSRegEx}}" data-errormsg="{{lastnameRegExViolationErrorMsg}}"/>