diff --git a/apps/paf/fields/index.js b/apps/paf/fields/index.js index 622894da..00f54f64 100644 --- a/apps/paf/fields/index.js +++ b/apps/paf/fields/index.js @@ -582,7 +582,7 @@ module.exports = { }, 'crime-location-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'crime-another-location': { isPageHeading: true, @@ -646,7 +646,7 @@ module.exports = { }, 'crime-another-location-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'report-person': { mixin: 'radio-group', @@ -796,7 +796,7 @@ module.exports = { }, 'report-person-location-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'report-person-location-email': { validate: ['email', { type: 'maxlength', arguments: 100 }] @@ -880,7 +880,7 @@ module.exports = { }, 'report-person-occupation-company-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'report-person-occupation-company-manager': { mixin: 'input-text', @@ -940,7 +940,7 @@ module.exports = { }, 'report-person-study-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'report-person-study-email': { validate: ['email', { type: 'maxlength', arguments: 100 }] @@ -1196,7 +1196,7 @@ module.exports = { }, 'company-phone': { className: ['govuk-input', 'govuk-input--width-20'], - validate: [{ type: 'maxlength', arguments: 20 }] + validate: ['required', { type: 'maxlength', arguments: 20 }] }, 'company-email': { formatter: ['removespaces'], diff --git a/apps/paf/translations/src/en/validation.json b/apps/paf/translations/src/en/validation.json index 1b086f69..76a16e95 100644 --- a/apps/paf/translations/src/en/validation.json +++ b/apps/paf/translations/src/en/validation.json @@ -93,12 +93,19 @@ "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "crime-location-phone": { + "required": "Enter a valid phone number", + "maxlength": "You can't use more than {{maxlength}} characters for your answer" + }, + + "report-person-study-phone": { + "required": "Enter a valid phone number", "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "crime-another-location-address-postcode": { "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "crime-another-location-phone": { + "required": "Enter a valid phone number", "maxlength": "You can't use more than {{maxlength}} numbers for your answer" }, "report-person-first-name": { @@ -130,6 +137,7 @@ "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "report-person-location-phone": { + "required": "Enter a valid phone number", "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "report-person-location-email": { @@ -156,6 +164,11 @@ "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "report-person-occupation-company-phone": { + "required": "Enter a valid phone number", + "maxlength": "You can't use more than {{maxlength}} characters for your answer" + }, + "company-phone": { + "required": "Enter a valid phone number", "maxlength": "You can't use more than {{maxlength}} characters for your answer" }, "report-person-occupation-company-manager": {