@@ -381,6 +381,7 @@ module.exports = {
381
381
'boat-country-departure' : {
382
382
mixin : 'select' ,
383
383
className : [ 'typeahead' , 'js-hidden' ] ,
384
+ validate : [ 'required' , 'notUrl' ] ,
384
385
options :
385
386
[ {
386
387
value : '' ,
@@ -415,6 +416,7 @@ module.exports = {
415
416
'train-country-departure' : {
416
417
mixin : 'select' ,
417
418
className : [ 'typeahead' , 'js-hidden' ] ,
419
+ validate : [ 'required' , 'notUrl' ] ,
418
420
options :
419
421
[ {
420
422
value : '' ,
@@ -452,6 +454,7 @@ module.exports = {
452
454
'airline-country-departure' : {
453
455
mixin : 'select' ,
454
456
className : [ 'typeahead' , 'js-hidden' ] ,
457
+ validate : [ 'required' , 'notUrl' ] ,
455
458
options :
456
459
[ {
457
460
value : '' ,
@@ -544,6 +547,7 @@ module.exports = {
544
547
'crime-location-country' : {
545
548
mixin : 'select' ,
546
549
className : [ 'typeahead' , 'js-hidden' ] ,
550
+ validate : [ 'required' , 'notUrl' ] ,
547
551
options :
548
552
[ {
549
553
value : '' ,
@@ -591,7 +595,11 @@ module.exports = {
591
595
} ,
592
596
'crime-location-phone' : {
593
597
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
594
- validate : [ { type : 'maxlength' , arguments : 20 } ]
598
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ] ,
599
+ dependent : {
600
+ field : 'crime-location' ,
601
+ value : 'yes'
602
+ }
595
603
} ,
596
604
'crime-another-location' : {
597
605
isPageHeading : true ,
@@ -607,6 +615,7 @@ module.exports = {
607
615
'crime-another-location-country' : {
608
616
mixin : 'select' ,
609
617
className : [ 'typeahead' , 'js-hidden' ] ,
618
+ validate : [ 'required' , 'notUrl' ] ,
610
619
options :
611
620
[ {
612
621
value : '' ,
@@ -654,7 +663,11 @@ module.exports = {
654
663
} ,
655
664
'crime-another-location-phone' : {
656
665
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
657
- validate : [ { type : 'maxlength' , arguments : 20 } ]
666
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ] ,
667
+ dependent : {
668
+ field : 'crime-another-location' ,
669
+ value : 'yes'
670
+ }
658
671
} ,
659
672
'report-person' : {
660
673
mixin : 'radio-group' ,
@@ -756,6 +769,7 @@ module.exports = {
756
769
'report-person-location-outside-uk-address-country' : {
757
770
mixin : 'select' ,
758
771
className : [ 'typeahead' , 'js-hidden' ] ,
772
+ validate : [ 'required' , 'notUrl' ] ,
759
773
options :
760
774
[ {
761
775
value : '' ,
@@ -782,6 +796,7 @@ module.exports = {
782
796
'report-person-location-travel-to-uk-country' : {
783
797
mixin : 'select' ,
784
798
className : [ 'typeahead' , 'js-hidden' ] ,
799
+ validate : [ 'required' , 'notUrl' ] ,
785
800
options :
786
801
[ {
787
802
value : '' ,
@@ -803,7 +818,7 @@ module.exports = {
803
818
} ,
804
819
'report-person-location-phone' : {
805
820
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
806
- validate : [ { type : 'maxlength' , arguments : 20 } ]
821
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ]
807
822
} ,
808
823
'report-person-location-email' : {
809
824
validate : [ 'email' , { type : 'maxlength' , arguments : 100 } ]
@@ -887,7 +902,7 @@ module.exports = {
887
902
} ,
888
903
'report-person-occupation-company-phone' : {
889
904
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
890
- validate : [ { type : 'maxlength' , arguments : 20 } ]
905
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ]
891
906
} ,
892
907
'report-person-occupation-company-manager' : {
893
908
mixin : 'input-text' ,
@@ -947,7 +962,7 @@ module.exports = {
947
962
} ,
948
963
'report-person-study-phone' : {
949
964
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
950
- validate : [ { type : 'maxlength' , arguments : 20 } ]
965
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ]
951
966
} ,
952
967
'report-person-study-email' : {
953
968
validate : [ 'email' , { type : 'maxlength' , arguments : 100 } ]
@@ -1204,7 +1219,7 @@ module.exports = {
1204
1219
} ,
1205
1220
'company-phone' : {
1206
1221
className : [ 'govuk-input' , 'govuk-input--width-20' ] ,
1207
- validate : [ { type : 'maxlength' , arguments : 20 } ]
1222
+ validate : [ 'required' , { type : 'maxlength' , arguments : 20 } ]
1208
1223
} ,
1209
1224
'company-email' : {
1210
1225
formatter : [ 'removespaces' ] ,
0 commit comments