Commit f0f9a8ec authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

update password

See merge request !1497
parents 62e20a37 2ee6e915
...@@ -57,7 +57,8 @@ class ResetPassword extends Component { ...@@ -57,7 +57,8 @@ class ResetPassword extends Component {
isRegex(value) { isRegex(value) {
// const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/; // const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/;
const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#_?&]{1,}$/; const re = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?([^\w\s]|[_])).{8,}$/
// const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#_?&])[A-Za-z\d@$!%*#?&]{1,}$/;
return re.test(String(value)); return re.test(String(value));
// return value // return value
} }
...@@ -82,6 +83,8 @@ class ResetPassword extends Component { ...@@ -82,6 +83,8 @@ class ResetPassword extends Component {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' }) this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' })
} else { } else {
this.confirmPassword() this.confirmPassword()
// console.log(this.state.password)
// console.log(this.state.confirmPassword)
} }
} }
......
...@@ -57,7 +57,8 @@ class SetPassword extends Component { ...@@ -57,7 +57,8 @@ class SetPassword extends Component {
isRegex(value) { isRegex(value) {
// const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/; // const re = /^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/;
const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/; // const re = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{1,}$/;
const re = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?([^\w\s]|[_])).{8,}$/
return re.test(String(value)); return re.test(String(value));
// return value // return value
} }
...@@ -82,6 +83,8 @@ class SetPassword extends Component { ...@@ -82,6 +83,8 @@ class SetPassword extends Component {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' }) this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' })
} else { } else {
this.confirmPassword() this.confirmPassword()
// console.log(this.state.password)
// console.log(this.state.confirmPassword)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment