Commit 2ee6e915 authored by d.arizona's avatar d.arizona

update password

parent 345161ad
......@@ -57,7 +57,8 @@ class ResetPassword extends Component {
isRegex(value) {
// 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 value
}
......@@ -82,6 +83,8 @@ class ResetPassword extends Component {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' })
} else {
this.confirmPassword()
// console.log(this.state.password)
// console.log(this.state.confirmPassword)
}
}
......
......@@ -57,7 +57,8 @@ class SetPassword extends Component {
isRegex(value) {
// 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 value
}
......@@ -82,6 +83,8 @@ class SetPassword extends Component {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'The password and password confirmation do not match' })
} else {
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