Merge pull request #1581 from openMF/iohacker-fix-password-change
Fix the Change Password Functionality and add # as special character
This commit is contained in:
@@ -64,7 +64,7 @@ export class UserService {
|
|||||||
*/
|
*/
|
||||||
changePassword(userId: string, passwordObj: any) {
|
changePassword(userId: string, passwordObj: any) {
|
||||||
|
|
||||||
return this.http.put(`/self/user/${userId}`, passwordObj);
|
return this.http.put(`/users/${userId}`, passwordObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class ChangePasswordDialogComponent implements OnInit {
|
|||||||
/** Change Password form */
|
/** Change Password form */
|
||||||
createChangePasswordForm() {
|
createChangePasswordForm() {
|
||||||
this.changePasswordForm = this.formBuilder.group({
|
this.changePasswordForm = this.formBuilder.group({
|
||||||
'password': ['', [Validators.required, Validators.pattern('^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&].{8,}$'), Validators.maxLength(50), Validators.minLength(8)]],
|
'password': ['', [Validators.required, Validators.pattern('^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*[#$@$!%*?&])[A-Za-z\d#$@$!%*?&].{8,}$'), Validators.maxLength(50), Validators.minLength(8)]],
|
||||||
'repeatPassword': ['', [Validators.required, this.confirmPassword('password')]]
|
'repeatPassword': ['', [Validators.required, this.confirmPassword('password')]]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user