rubyforgood/voices-of-consent
View on GitHub/requesters/new not showing the correct errors
Open
#399 opened on Nov 30, 2019
Priority: Mediumhelp wanted
Repository metrics
- Stars
- (40 stars)
- PR merge metrics
- (PR metrics pending)
Description
When all required fields are populated and one of them has incorrect data the form shows an email error instead of the correct errors.
This is happening due to https://github.com/rubyforgood/voices-of-consent/blob/71e627f0a324084bf43b32084712ba1b319cf7b4/app/javascript/src/components/box-request-form/BoxRequestForm.js#L245
Replicate steps:
- Go to http://localhost:5000/requesters/new
- Populate all fields and make sure email is valid, and phone and zip-code are not valid (for example add letters only)
- Submit
- An error shows up saying that the email is wrong, although what is wrong are the fields phone and zip-code