Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1426 from ONSdigital/mci-rsi-range-validation
Browse files Browse the repository at this point in the history
Apply range validation to MCI/RSI questionnaires
  • Loading branch information
dwyeradam authored Jan 19, 2018
2 parents 3cfc258 + 6ae1289 commit 0d06e91
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 38 deletions.
5 changes: 4 additions & 1 deletion data/en/1_0102.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@
"q_code": "21",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover-answer"
}
}],
"id": "internet-sales-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>internet</em> sales?",
Expand Down
25 changes: 20 additions & 5 deletions data/en/1_0112.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@
"q_code": "21",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover-answer"
}
}],
"id": "internet-sales-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>internet</em> sales?",
Expand Down Expand Up @@ -469,28 +472,40 @@
"label": "Number of male employees working more than 30 hours per week",
"mandatory": false,
"q_code": "51",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "male-employees-under-30-hours",
"label": "Number of male employees working 30 hours or less per week",
"mandatory": false,
"q_code": "52",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "female-employees-over-30-hours",
"label": "Number of female employees working more than 30 hours per week",
"mandatory": false,
"q_code": "53",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "female-employees-under-30-hours",
"label": "Number of female employees working 30 hours or less per week",
"mandatory": false,
"q_code": "54",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
}
],
"id": "employee-breakdown-questions",
Expand Down
30 changes: 24 additions & 6 deletions data/en/1_0203.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@
"q_code": "22",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "total-sales-food-question",
Expand Down Expand Up @@ -338,7 +341,10 @@
"q_code": "23",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "total-sales-alcohol-question",
Expand Down Expand Up @@ -370,7 +376,10 @@
"q_code": "24",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "total-sales-clothing-question",
Expand Down Expand Up @@ -414,7 +423,10 @@
"q_code": "25",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}

}],
"id": "total-sales-household-goods-question",
Expand Down Expand Up @@ -468,7 +480,10 @@
"q_code": "26",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "total-sales-other-goods-question",
Expand Down Expand Up @@ -497,7 +512,10 @@
"q_code": "21",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "internet-sales-question",
Expand Down
30 changes: 24 additions & 6 deletions data/en/1_0205.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@
"q_code": "22",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-food-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>food</em> sales?",
Expand Down Expand Up @@ -354,7 +357,10 @@
"q_code": "23",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"description": "",
"id": "total-sales-alcohol-question",
Expand Down Expand Up @@ -386,7 +392,10 @@
"q_code": "24",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-clothing-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>clothing and footwear</em> sales?",
Expand Down Expand Up @@ -429,7 +438,10 @@
"q_code": "25",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-household-goods-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of sales for <em>household goods</em>?",
Expand Down Expand Up @@ -484,7 +496,10 @@
"q_code": "26",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-other-goods-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>other</em> sales?",
Expand Down Expand Up @@ -512,7 +527,10 @@
"q_code": "21",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "internet-sales-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>internet</em> sales?",
Expand Down
50 changes: 40 additions & 10 deletions data/en/1_0213.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@
"q_code": "22",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-food-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>food</em> sales?",
Expand Down Expand Up @@ -379,7 +382,10 @@
"q_code": "23",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-alcohol-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>alcohol, confectionery and tobacco</em> sales?",
Expand Down Expand Up @@ -410,7 +416,10 @@
"q_code": "24",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-clothing-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>clothing and footwear</em> sales?",
Expand Down Expand Up @@ -453,7 +462,10 @@
"q_code": "25",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-household-goods-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of sales for <em>household goods</em>?",
Expand Down Expand Up @@ -506,7 +518,10 @@
"q_code": "26",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "total-sales-other-goods-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>other</em> sales?",
Expand All @@ -533,7 +548,10 @@
"q_code": "21",
"type": "Currency",
"currency": "GBP",
"decimal_places": 2
"decimal_places": 2,
"max_value": {
"answer_id": "total-retail-turnover"
}
}],
"id": "internet-sales-question",
"title": "Of the <em>{{answers.total_turnover|format_currency}}</em> total retail turnover, what was the value of <em>internet</em> sales?",
Expand Down Expand Up @@ -754,28 +772,40 @@
"label": "Number of male employees working more than 30 hours per week",
"mandatory": false,
"q_code": "51",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "number-male-employees-under-30-hours",
"label": "Number of male employees working 30 hours or less per week",
"mandatory": false,
"q_code": "52",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "number-female-employees-over-30-hours",
"label": "Number of female employees working more than 30 hours per week",
"mandatory": false,
"q_code": "53",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
},
{
"id": "number-female-employees-under-30-hours",
"label": "Number of female employees working 30 hours or less per week",
"mandatory": false,
"q_code": "54",
"type": "Number"
"type": "Number",
"max_value": {
"answer_id": "total-number-employees"
}
}
],
"id": "employee-breakdown-questions",
Expand Down
Loading

0 comments on commit 0d06e91

Please sign in to comment.