Nova-Scotia-Digital-Service / service-pattern-library

4 stars 2 forks source link

Add phone number pattern #56

Closed jamie-benoit closed 3 years ago

jamie-benoit commented 3 years ago

I was looking error message for Nova Scotia Safe Check-in Form (https://traveldeclaration-dev.apps.nonprod.novascotia.ca/en/Declaration/DestinationInfo) and for the phone number it is "Your phone number must be at least 10 digits." image

for Ticket Lottery, it is "Enter your phone number in the format of 902-123-1234." image

for Pay a Debt, it is" Invalid daytime phone number specified" image

My question is... Do we want to have a standard error message for fields phone, address, email or other fields?

connorscarolyns commented 3 years ago

@jamie-benoit I don't think we need to be so prescriptive, if we had a phone number pattern then we could have some solid suggestions as we do for some other pages, but we do have guidelines set out for people to help them write better messages. https://nova-scotia-digital-service.github.io/service-pattern-library/error-message.html https://nova-scotia-digital-service.github.io/service-pattern-library/email-address.html#error-messages

connorscarolyns commented 3 years ago

Let's add a phone number pattern, Use UK example as a starting point. Be sure to include guidance on errors. Consider advice on international. business, daytime contact, text message and other types of numbers @gabwhite will work on this.

gabwhite commented 3 years ago

updated - pull request #69 has a start on this work!

gabwhite commented 3 years ago

This is done and can be continuously improved!