Hi I am hoping this may be and easy one for some of you.
Essentially I am just asking if it is possible to use a regex match statement within a if statement.
I have used some in my Formik validation schema but am not sure if it is possible to use within an if statement.
This is my if statement
if (this.state.email.length < 8 || this.state.password.length < 8)
I would like to include something along the logic of
.matches(/(?=.*outlook)/)
Is this possible ?