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

Creating new patient - validation messages not appropriate #2699

Open
savanrajkotiya opened this issue Jun 14, 2021 · 5 comments
Open

Creating new patient - validation messages not appropriate #2699

savanrajkotiya opened this issue Jun 14, 2021 · 5 comments
Labels
🐛bug issue/pull request that documents/fixes a bug

Comments

@savanrajkotiya
Copy link

Before you submit an issue we recommend you drop into our Slack workspace and ask any questions you have or mention any problems you've had getting started with HospitalRun.

Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the missing discussion label.

🐛 Bug Report

The validation messages of inputs are not appropriate
ex. 'Must be a valid phone number.' but what's a valid phone number pattern.?
PFA the Image

To Reproduce

Steps to reproduce the behavior:

  • Try creating a new patient with contact number digits more than 14-15 digits

Expected behavior

A clear and appropriate validation message should appear so that user will get to know what mistake that they made.

Your Environment

  • node version: 10
  • fastify version: >=1.0.0
  • os: Ubuntu 20.0.4
  • any other relevant information

Screenshot from 2021-06-14 21-52-31

@matteovivona matteovivona added the 🐛bug issue/pull request that documents/fixes a bug label Jun 17, 2021
@dangnhon
Copy link

Hi there @tehkapa, what would be the expected validation message? Something on the lines of "Must be valid 10 digit" or etc? I'm interested in this issue.

@matteovivona
Copy link
Contributor

@dangnhon yes, it would be necessary to do a validation in terms of country code and max phone digits

@reginz
Copy link

reginz commented Jun 21, 2021

Hi @tehkapa. So I found this https://github.com/jackocnr/intl-tel-input I think you can use this input field and maybe you can check if user input is equal to selectedCountryPlaceholder or not.

@matteovivona
Copy link
Contributor

@reginz looks fine

@abhiFSD
Copy link

abhiFSD commented Jan 3, 2023

hello @tehkapa can I work on this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants