Skip to content

Commit

Permalink
PAF-129/ PAF-128 - Fix bug to add country from list and validate coun…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
TemitopeAyokuHO authored and JHoldergov committed Feb 1, 2024
1 parent 413d5a2 commit dae8055
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions apps/paf/translations/src/en/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,34 @@
"when-to-contact": {
"maxlength": "You can't use more than {{maxlength}} characters for your answer"
},
"boat-country-departure": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"airline-country-departure": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"crime-location-country": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"crime-another-location-country": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"train-country-departure": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"report-person-location-outside-uk-address-country": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"report-person-location-travel-to-uk-country": {
"required": "Enter a valid country",
"notUrl": "Enter a valid country on the list"
},
"other-info-file-upload": {
"maxFileSize": "Select a file that is smaller than 100 MB",
"fileType": "This file is not a valid file format you can upload to this service."
Expand Down

0 comments on commit dae8055

Please sign in to comment.