UNPKG

stitch-ui

Version:

16 lines (13 loc) 348 B
const validateUserPass = ({ email, password, confirmPassword }) => { if (email.length === 0) { return "username must not be empty"; } if (password.length === 0) { return "password must not be empty"; } if (password !== confirmPassword) { return "passwords must match"; } return null; }; export default validateUserPass;