Skip to content
Snippets Groups Projects
Commit 5fc7c6d8 authored by mperezsa's avatar mperezsa
Browse files

Upload New File

parent c984032f
No related branches found
No related tags found
No related merge requests found
export default function validateRegistration(user) {
let errors = {};
if (user.firstName === "") {
errors.firstName = "Username is Required";
}
if (user.organizationName === "") {
errors.organizationName = "Official name of organization is Required";
}
if (user.email === "") {
errors.email = "Email is Required";
} else if (!/\S+@\S+\.\S+/.test(user.email)) {
errors.email = "Email Address is Invalid";
}
if (user.password === "") {
errors.password = "Password is Required";
}
return errors;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment