Skip to content

Commit bc643d5

Browse files
add deoendent to phone field in index file
1 parent c969b57 commit bc643d5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

apps/paf/fields/index.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,11 @@ module.exports = {
582582
},
583583
'crime-location-phone': {
584584
className: ['govuk-input', 'govuk-input--width-20'],
585-
validate: ['required', { type: 'maxlength', arguments: 20 }]
585+
validate: ['required', { type: 'maxlength', arguments: 20 }],
586+
dependent: {
587+
field: 'crime-location',
588+
value: 'yes'
589+
}
586590
},
587591
'crime-another-location': {
588592
isPageHeading: true,
@@ -646,7 +650,11 @@ module.exports = {
646650
},
647651
'crime-another-location-phone': {
648652
className: ['govuk-input', 'govuk-input--width-20'],
649-
validate: ['required', { type: 'maxlength', arguments: 20 }]
653+
validate: ['required', { type: 'maxlength', arguments: 20 }],
654+
dependent: {
655+
field: 'crime-another-location',
656+
value: 'yes'
657+
}
650658
},
651659
'report-person': {
652660
mixin: 'radio-group',

0 commit comments

Comments
 (0)