Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Create/Edit Patient inputs are not validated #1976

Closed
martimfj opened this issue Apr 7, 2020 · 6 comments · Fixed by #2032
Closed

Create/Edit Patient inputs are not validated #1976

martimfj opened this issue Apr 7, 2020 · 6 comments · Fixed by #2032

Comments

@martimfj
Copy link
Contributor

martimfj commented Apr 7, 2020

When creating and editing a patient, only the required givenName is validated. The email and tel inputs can be anything and the date of birth can be a day greater than today.

🐛 Bug Report

Input fields from Editing/Creating Patients are not validated.

To Reproduce

Input a text in the telephone field
Input a text that is not an email in the email field
Input a date in 2021 in the date of birth field

The components already give a way to add validation feedback to the user, but it is not used at the time.

@BrunaKimura
Copy link

Should text fields also be validated to avoid numeric inputs?

For example:

  • Suffix
  • Preffix
  • Given Name
  • Family Name
  • Occupation
  • Preferred Language

@LucasBN
Copy link
Contributor

LucasBN commented Apr 17, 2020

And perhaps address could be validated somehow? I could take a look at that if someone would assign me. Should I create a new issue or is here okay?

@jackcmeyer
Copy link
Member

jackcmeyer commented Apr 17, 2020

And perhaps address could be validated somehow? I could take a look at that if someone would assign me. Should I create a new issue or is here okay?

@LucasBN I think validating addresses may be difficult due to needing to support any address format for any location in the world; however I have not looked into it. I think we can just tack it on to this one.

@jackcmeyer
Copy link
Member

Should text fields also be validated to avoid numeric inputs?

For example:

  • Suffix
  • Preffix
  • Given Name
  • Family Name
  • Occupation
  • Preferred Language

@BrunaKimura I think that preventing numeric inputs is reasonable except for Occupation.

@LucasBN
Copy link
Contributor

LucasBN commented Apr 17, 2020

@LucasBN I think validating addresses may be difficult due to needing to support any address format for any location in the world; however I have not looked into it. I think we can just tack it on to this one.

Yeah I also thought that might be a problem. I'm going to look into it anyway as I'd like to contribute somewhat - will let you know if I get anywhere. (I'll look at avoiding numeric inputs whilst I'm at it).

@jackcmeyer
Copy link
Member

@LucasBN I think validating addresses may be difficult due to needing to support any address format for any location in the world; however I have not looked into it. I think we can just tack it on to this one.

Yeah I also thought that might be a problem. I'm going to look into it anyway as I'd like to contribute somewhat - will let you know if I get anywhere. (I'll look at avoiding numeric inputs whilst I'm at it).

sounds great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants