-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix(form): show error at the end if inputs are not valid #398
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Great! Thanks! Just thinking about some details:
- I think clicking the
ImageUpload
somehow trigger thesubmit
function, so if there's any errors on the page, the error would be fixed at the bottom of the form, maybe check the button type ofImageUpload
- even after I fixed the errors (e.g. fix the length of the name) the error is stilly displayed
- just suggestion, thinking about changing those error reminder to other color rather than just black
- another suggestion, also thinking about move the
errorMessage
to alignRight under the submit buttons - Also thinking about should we also check the restrictions before clicking
Next
?
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.
@NicoSerranoP thanks, just one comment
|
This 5th one is not required, just a suggestion, no need to spend much time on it. |
@kittybest @0xmad @ctrlc03 I fixed two ui issues that are being addressed at #407 as well. I think the only component that would give us conflict when merging that branch is |
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.
Currently lgtm, thanks a lot! plz rebase and fix the conflicts
I think we need @0xmad 's approval for the code changes request |
@NicoSerranoP There's still prettier and commitlint check not passed.
|
Problem
The
Form
component uses pages for forms that have multiple sections. In each section the inputs already alert the user about some conditions (e.g.: you need a valid eth address, this field needs at least 3 words, etc).The problem happens in the end. If the user ignored the warnings of each input in each section, then the form is not valid and cannot be submitted. When the user press the submit button nothing happens (no alert).
Solution
Detect if the form has any validation errors and tell the user that when he presses the submit button. That way the user will know he needs to trace back and find the input validation error.
Extras
/rounds/[roundId]/new
page