validationSchema2() {
return Yup.object().shape({
password: Yup.string()
.required("Please Enter your new password")
.min(8)
.max(40)
.matches(
/^(?=.*[A-Z])(?=.*[a-z])(?=.*d)(?=.*[^A-Za-z0-9]).{8,}$/,
"Must Contain at least 8 Characters, One Uppercase, One Lowercase, One Number and One Special Case Character"
),
confirmPassword: Yup.string()
.required("Confirm New Password is required")
.oneOf([Yup.ref("password"), null], "Confirm Password does not match"),
});
}
new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9_])")
uppercase, lowercase, number and special characters
new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9_])")