Signup form validation

I'm building a sign up form that looks like this:
const schema = type({
    email: 'email',
    password: 'string>1',
    confirmPassowrd: 'string'
})

How can I validate the confirmPassword field and make sure it is equal "===" to the password field?

SOLUTION: Signup form validation
Was this page helpful?