diff --git a/src/modules/users/add-user/add-user.html b/src/modules/users/add-user/add-user.html index 9cbc1b48..fa94fa01 100644 --- a/src/modules/users/add-user/add-user.html +++ b/src/modules/users/add-user/add-user.html @@ -43,7 +43,7 @@
- + @@ -57,7 +57,7 @@
- + diff --git a/src/modules/users/add-user/add-user.js b/src/modules/users/add-user/add-user.js index c577cc0d..3ce26662 100644 --- a/src/modules/users/add-user/add-user.js +++ b/src/modules/users/add-user/add-user.js @@ -87,12 +87,16 @@ } else if (form.username.$invalid) { vm.errorMsg = "Please specify valid User Id."; isFormValid = false; + } else if ((form.confirmPassword.$dirty && form.confirmPassword.$error.minlength) || + (form.password.$dirty && form.password.$error.minlength)) { + vm.errorMsg = "Password should contain minimum 9 characters."; + isFormValid = false; } else if ((form.confirmPassword.$dirty && form.confirmPassword.$error.maxlength) || (form.password.$dirty && form.password.$error.maxlength)) { - vm.errorMsg = "Password can contain maximum 128 characters." + vm.errorMsg = "Password can contain maximum 128 characters."; isFormValid = false; } else if (form.password.$invalid || form.confirmPassword.$invalid) { - vm.errorMsg = "Please specify valid Password." + vm.errorMsg = "Please specify valid Password."; isFormValid = false; } else if (!_isPasswordSame()) { vm.errorMsg = "Password and Confirm Password doesn't match."; @@ -118,4 +122,4 @@ } } -})(); +})(); \ No newline at end of file diff --git a/src/modules/users/edit-user/edit-user.html b/src/modules/users/edit-user/edit-user.html index 0254cce0..57b475d0 100644 --- a/src/modules/users/edit-user/edit-user.html +++ b/src/modules/users/edit-user/edit-user.html @@ -42,7 +42,7 @@
- + @@ -56,7 +56,7 @@
- + diff --git a/src/modules/users/edit-user/edit-user.js b/src/modules/users/edit-user/edit-user.js index 4741a117..b31dfcaf 100644 --- a/src/modules/users/edit-user/edit-user.js +++ b/src/modules/users/edit-user/edit-user.js @@ -100,9 +100,13 @@ if (form.name.$invalid) { vm.errorMsg = "Please specify valid Name." isFormValid = false; + } else if((form.confirmPassword.$dirty && form.confirmPassword.$error.minlength) || + (form.password.$dirty && form.password.$error.minlength) ) { + vm.errorMsg = "Password should contain minimum 9 characters."; + isFormValid = false; } else if((form.confirmPassword.$dirty && form.confirmPassword.$error.maxlength) || (form.password.$dirty && form.password.$error.maxlength) ) { - vm.errorMsg = "Password can contain maximum 128 characters." + vm.errorMsg = "Password can contain maximum 128 characters."; isFormValid = false; } else if (!_isPasswordSame()) { vm.errorMsg = "Password and Confirm Password doesn't match.";