Skip to content

Commit

Permalink
Fix ovc enrollment && discontinuation validations (#183)
Browse files Browse the repository at this point in the history
Co-authored-by: Makombe <makombe>
  • Loading branch information
makombe authored Sep 6, 2023
1 parent ea3ebd6 commit 5fed95c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions configuration/ampathforms/OVC_Discontinuation.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"label": "Exit Reasons",
"type": "obs",
"id": "discontinuationReason",
"required": "true",
"questionOptions": {
"concept": "161555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "select",
Expand Down
10 changes: 2 additions & 8 deletions configuration/ampathforms/OVC_Enrollment.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"validators": [
{
"type": "js_expression",
"failsWhenExpression": "(myValue).length > 10 || (myValue).length <10",
"failsWhenExpression": "!isEmpty(myValue) && (myValue).length !==10",
"message": "Phone number digits should be equal to 10"
}
],
Expand Down Expand Up @@ -216,13 +216,7 @@
"concept": "165416AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"showDate": "false"
},
"validators": [
{
"type": "js_expression",
"failsWhenExpression": "(myValue).length > 7 || (myValue).length < 7",
"message": "CPIMS unique identifier digits should not be more or less than 7"
}
],
"validators": [],
"hide": {
"hideWhenExpression": "enrolledCpims != '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
}
Expand Down

0 comments on commit 5fed95c

Please sign in to comment.