-
Notifications
You must be signed in to change notification settings - Fork 248
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) O3-2867: Add required validation to the conditions form's condition field #1665
(fix) O3-2867: Add required validation to the conditions form's condition field #1665
Conversation
I think we should just indicate that a condition is required to save the form. The error title is somehow misleading since at this point we haven't hit the backend. |
Thanks Antony, let me work on it in that line and would wait for your view about the changes |
packages/esm-patient-conditions-app/src/conditions/conditions-form.component.tsx
Outdated
Show resolved
Hide resolved
@Twiineenock these are so many files changed, try to rebase well. |
@hadijahkyampeire I repeated the rebasing I think I think they yarn file changed because of this command |
@Twiineenock Yes the yarn lock changes after running yarn up, please always revert the changes after. |
State of things following the commit I pushed: conditions-validation.mp4These changes:
They are informed by this discussion on the ux-design-advisory channel. |
A subsequent fix to this should mark the |
- Don't disable submit button if mandatory fields are not filled - Append an asterisk to labels of mandatory fields to mark them as such
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.
Thanks, @Twiineenock!
Changes implemented in subsequent commits
…tion field (openmrs#1665) * validate conditions form * validate conditions form * validate conditions form * validate conditions form * validation * validation * updated core libraries * (fix) Add validation on the conditions form * validation * fix tests * update libraries * fix tests * Final tweaks - Don't disable submit button if mandatory fields are not filled - Append an asterisk to labels of mandatory fields to mark them as such * Fix E2E test * More fixes - only validate existence of a condition when creating --------- Co-authored-by: Dennis Kigen <[email protected]>
Requirements
Summary
Currently, when a user try to submit the conditions form without selecting a condition no form validation is displayed. Something like 'Please choose a condition' can be shown to the user.
Screenshots
before
after fix
Related Issue
https://openmrs.atlassian.net/browse/O3-2867
Other
attachments to issue
ConditionForm.webm