Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getSignupFormFieldErrors = fields => {
- let errors = {};
- if (typeof fields.username === "undefined") {
- errors.username = MISSING_FIELD;
- }
- if (typeof fields.email === "undefined") {
- errors.email = MISSING_FIELD;
- }
- if (typeof fields.password === "undefined") {
- errors.password = MISSING_FIELD;
- }
- if (typeof fields.passwordConfirmation === "undefined") {
- errors.passwordConfirmation = MISSING_FIELD;
- }
- return errors;
- };
Add Comment
Please, Sign In to add comment