-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use error response from backend to display correct error message #27
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't notice any difference on my machine. Can you send a screencast?
30c47ff
to
8b46ea0
Compare
const errors = errorMessage[field]; | ||
errors.forEach(err => | ||
( | ||
<p> {field} : {err} </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@algomaster99 I see the control is reaching here but this line is not returned to the screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuyashSalampuria forEach
always returns undefined
, which is the reason you cannot see any <p>
element. You can use map
and this will be resolved. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some errors with your submission
I think the error is still very equivocal. No one can figure out why the error came at the first go.
Anyway, You don't need to hardcode the error message on the frontend. That's what I am saying. You can edit the backend to throw such error messages. Did you refer to full_clean
? If not, please do it. I also suggest referring to omniport-frontend-faculty-profile
's code to see how it's done.
8b46ea0
to
10c55b1
Compare
@SuyashSalampuria sorry I really forgot about this |
Fixes #24