Skip to content

Commit

Permalink
[LEVWEB-1230] Range validation for partnerships
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ac-martin committed Apr 5, 2019
1 parent 580412c commit 21000de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fields/partnership.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ module.exports = {
}
},
'dop': {
validate: ['british-date', 'past', 'required'],
validate: ['british-date', 'past', {
type: 'since',
arguments: [require('moment')('1/12/2005', 'DD/MM/YYYY')]
}, 'required'],
dependent: {
value: '',
field: 'system-number'
Expand Down
2 changes: 1 addition & 1 deletion locales/en/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"required": "Please enter a date of civil partnership",
"british-date": "Please enter a date of civil partnership in the correct format",
"past": "Please enter a date of civil partnership in the past",
"since": "Please enter a date after our records began (1 July 2009)"
"since": "Please enter a date after our records began (1 December 2005)"
},
"from": {
"required": "Please enter a date to search from",
Expand Down

0 comments on commit 21000de

Please sign in to comment.