rubyforgood/voices-of-consent

/requesters/new not showing the correct errors

Aperta

#399 aperta il 30 nov 2019

 (5 commenti) (0 reazioni) (1 assegnatario)Ruby (80 fork)auto 404
Priority: Mediumhelp wanted

Metriche repository

Star
 (40 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor