From 8000124f8c6e9b9e30fe31b6676f35b56a041fc1 Mon Sep 17 00:00:00 2001 From: Pasindu Date: Fri, 1 Sep 2017 16:48:30 +0530 Subject: [PATCH] Fixes validation of role when creating new user --- .../app/pages/cdmf.page.user.create/public/js/bottomJs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js index 28d4af3fdb..83a581368e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js @@ -256,6 +256,9 @@ $(document).ready(function () { } else if (!emailIsValid(emailAddress)) { $(errorMsg).text("Provided email is invalid."); $(errorMsgWrapper).removeClass("hidden"); + } else if (!roles) { + $(errorMsg).text("Role is a required field. It cannot be empty."); + $(errorMsgWrapper).removeClass("hidden"); } else { var addUserFormData = {};