-
Notifications
You must be signed in to change notification settings - Fork 0
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
PAF-129/ PAF-128 - Fix bug to add country from list and validate country textbox. #96
Conversation
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.
Otherwise the update to code looks fine - stops users from entering a non-country-list entry here.
I would actually question if this is a bug in the first place. I wonder from a UCD perspective whether any text entry should be allowed in case the countryList
becomes out of date or is incomplete. It may be more of an advisory list. As far as I know every other HOF form field with a country select has the typeahead and accepts non-list entry.
If business stakeholders have said these fields must absolutely have a value from the countryList
then no problem. But might be worth confirming with the ticket reporter.
2786914
to
711a511
Compare
The business came back with responses I have added a validation on each textbox for both country and phone number. a new ticket was created for this PAF-128 but i have made the modification on this branch |
711a511
to
7eec005
Compare
Now that the phone number fields are required on the page "Do you want to tell us about another location where the crime is taking place?" if I choose 'no' I still need to go back and fill in a phone number on the 'yes' bit before I can continue. I think the phone number field might need a |
The business comment above seems to me to suggest that empty field should be an option, but if they want to put something it should be a country from the list. Now that fields are required they must have a value, and once a value from the list has been added it can't be removed again except with another one from the list. |
I have just realised this issue after replicating it, i will be fixing it |
Reason for doing this was if the user enters a country which is not from the list, in the summary page the country will not render. to fix this bug a validation control is necessary or dropdown menu. I hope this answers that? |
Yes, that makes sense to me, thanks. |
7eec005
to
bc643d5
Compare
[PAF- 129](https://collaboration.homeoffice.gov.uk/jira/browse/PAF-129) All 'Country' fields allow any text without the use of drop down list [PAF-128](https://collaboration.homeoffice.gov.uk/jira/browse/PAF-128 URL's are being accepted in all free text fields - added validation rules to all countries fields in field/index.js - added dependent property to avoid error message when yes is selected on another location Tested manually
bc643d5
to
c52738a
Compare
208097b
to
4d1f113
Compare
d9ba5c6
to
081e994
Compare
…try textbox. (#96) * PAF-128 & PAF-129 Added validation for phone and country textbox [PAF- 129](https://collaboration.homeoffice.gov.uk/jira/browse/PAF-129) All 'Country' fields allow any text without the use of drop down list [PAF-128](https://collaboration.homeoffice.gov.uk/jira/browse/PAF-128 URL's are being accepted in all free text fields - added validation rules to all countries fields in field/index.js - added dependent property to avoid error message when yes is selected on another location Tested manually * add behaviour to unset values
What?
PAF-128 Country' fields allow any text
PAF-129- All 'Country' fields allow any text without the use of drop down list
Why?
remove any url from the input text and accept validation entry.
this validation with control the textbox for both country and phone numbers
How?
Testing?
Manual testing via UI
Screenshots (optional)
Anything Else? (optional)