android-fhir
android-fhir copied to clipboard
In Date view if typed input is invalid then appropriate error message should be displayed.
Describe the bug
While user is typing date input until typed date input is valid, it shows missing answer for required field
as error message.
Component SDC library
Expected behavior It is expected that while user is typing date input until it is valid date, then it should show invalid input.
Screenshots

Smartphone (please complete the following information):
- Device: [e.g. Pixel4a emulator]
- Android version: [e.g. Settings -> About phone -> Android version]
- Build number: [e.g. Settings -> About phone -> Build number]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Would you like to work on the issue? Please state if this issue should be assigned to you or who you think could help to solve this issue.
Some thoughts
- I agree the error message should be updated
- While the user is typing it should display the hint text / date format text below.
- The flyover text should say Date.
- The error shouldn't appear while they are typing. Not exactly sure how we can do this, but it is frustrating to see errors too early and before people have completed the field.
What do you think @santosh-pingle @jingtang10?
Error message: "Date format needs to be dd/mm/yy"
Error message: "Date format needs to be dd/mm/yy"
sounds good to me
Discussion w/ Jing:
- Difficult to define when people are typing or are done typing
- Don't show error message if nothing has been typed.
Decision: always validate as users type
@shelaghm If date field have "required": true attribute, in this case both error messages are displayed like, "Missing answer for required field" "Date format needs to be dd/mm/yy"
out of these which message should be displayed in UI on priority? PLease find more details in below screenshot
@PallaviGanorkar Prioritize the date format "Date format needs to be dd/mm/yy" No need to show missing answer.
If nothing has been entered, then can show "missing answer" instead? I'm not sure if this is possible to show different error messages based on if anything has been typed in the box or not?