-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from formio/fix/FIO-8731_validation_hidden_co…
…mp_in_nested_forms
- Loading branch information
1 parent
5618762
commit 76c0e72
Showing
10 changed files
with
305 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import clearOnHideWithCustomCondition from './clearOnHideWithCustomCondition.json'; | ||
import clearOnHideWithHiddenParent from './clearOnHideWithHiddenParent.json'; | ||
import skipValidForConditionallyHiddenComp from './skipValidForConditionallyHiddenComp.json'; | ||
import skipValidForLogicallyHiddenComp from './skipValidForLogicallyHiddenComp.json'; | ||
import skipValidWithHiddenParentComp from './skipValidWithHiddenParentComp.json'; | ||
import data1a from './data1a.json'; | ||
import form1 from './form1.json'; | ||
import subs from './subs.json'; | ||
|
||
export { clearOnHideWithCustomCondition, clearOnHideWithHiddenParent, data1a, form1, subs }; | ||
export { clearOnHideWithCustomCondition, clearOnHideWithHiddenParent, skipValidForLogicallyHiddenComp, skipValidForConditionallyHiddenComp, skipValidWithHiddenParentComp, data1a, form1, subs }; |
67 changes: 67 additions & 0 deletions
67
src/process/__tests__/fixtures/skipValidForConditionallyHiddenComp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"form": { | ||
"name": "conditional", | ||
"path": "conditional", | ||
"type": "form", | ||
"display": "form", | ||
"components": [ | ||
{ | ||
"label": "Checkbox", | ||
"tableView": false, | ||
"validateWhenHidden": false, | ||
"key": "checkbox", | ||
"type": "checkbox", | ||
"input": true | ||
}, | ||
{ | ||
"collapsible": false, | ||
"key": "panel", | ||
"conditional": { | ||
"show": false, | ||
"conjunction": "all", | ||
"conditions": [ | ||
{ | ||
"component": "checkbox", | ||
"operator": "isEqual", | ||
"value": true | ||
} | ||
] | ||
}, | ||
"type": "panel", | ||
"label": "Panel", | ||
"input": false, | ||
"tableView": false, | ||
"components": [ | ||
{ | ||
"label": "Text Field", | ||
"applyMaskOn": "change", | ||
"tableView": true, | ||
"validate": { | ||
"required": true | ||
}, | ||
"validateWhenHidden": false, | ||
"key": "textField", | ||
"type": "textfield", | ||
"input": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "button", | ||
"label": "Submit", | ||
"key": "submit", | ||
"disableOnInvalid": true, | ||
"input": true, | ||
"tableView": false | ||
} | ||
], | ||
"created": "2024-08-02T10:28:35.696Z", | ||
"modified": "2024-08-02T10:28:35.704Z" | ||
}, | ||
"submission": { | ||
"data": { | ||
"checkbox": true, | ||
"submit": true | ||
} | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
src/process/__tests__/fixtures/skipValidForLogicallyHiddenComp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"form": { | ||
"type": "form", | ||
"display": "form", | ||
"components": [ | ||
{ | ||
"label": "Checkbox", | ||
"tableView": false, | ||
"validateWhenHidden": false, | ||
"key": "checkbox", | ||
"type": "checkbox", | ||
"input": true | ||
}, | ||
{ | ||
"collapsible": false, | ||
"key": "panel", | ||
"logic": [ | ||
{ | ||
"name": "1", | ||
"trigger": { | ||
"type": "simple", | ||
"simple": { | ||
"show": true, | ||
"conjunction": "all", | ||
"conditions": [ | ||
{ | ||
"component": "checkbox", | ||
"operator": "isEqual", | ||
"value": true | ||
} | ||
] | ||
} | ||
}, | ||
"actions": [ | ||
{ | ||
"name": "12", | ||
"type": "property", | ||
"property": { | ||
"label": "Hidden", | ||
"value": "hidden", | ||
"type": "boolean" | ||
}, | ||
"state": true | ||
} | ||
] | ||
} | ||
], | ||
"type": "panel", | ||
"label": "Panel", | ||
"input": false, | ||
"tableView": false, | ||
"components": [ | ||
{ | ||
"label": "Text Field", | ||
"applyMaskOn": "change", | ||
"tableView": true, | ||
"validate": { | ||
"required": true | ||
}, | ||
"validateWhenHidden": false, | ||
"key": "textField", | ||
"type": "textfield", | ||
"input": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "button", | ||
"label": "Submit", | ||
"key": "submit", | ||
"disableOnInvalid": true, | ||
"input": true, | ||
"tableView": false | ||
} | ||
], | ||
"created": "2024-08-02T10:28:35.696Z", | ||
"modified": "2024-08-02T10:28:35.704Z" | ||
}, | ||
"submission": { | ||
"data": { | ||
"checkbox": true, | ||
"submit": true | ||
} | ||
} | ||
} | ||
|
55 changes: 55 additions & 0 deletions
55
src/process/__tests__/fixtures/skipValidWithHiddenParentComp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"form": { | ||
"type": "form", | ||
"display": "form", | ||
"components": [ | ||
{ | ||
"label": "Checkbox", | ||
"tableView": false, | ||
"validateWhenHidden": false, | ||
"key": "checkbox", | ||
"type": "checkbox", | ||
"input": true | ||
}, | ||
{ | ||
"collapsible": false, | ||
"hidden": true, | ||
"key": "panel", | ||
"type": "panel", | ||
"label": "Panel", | ||
"input": false, | ||
"tableView": false, | ||
"components": [ | ||
{ | ||
"label": "Text Field", | ||
"applyMaskOn": "change", | ||
"tableView": true, | ||
"validate": { | ||
"required": true | ||
}, | ||
"validateWhenHidden": false, | ||
"key": "textField", | ||
"type": "textfield", | ||
"input": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "button", | ||
"label": "Submit", | ||
"key": "submit", | ||
"disableOnInvalid": true, | ||
"input": true, | ||
"tableView": false | ||
} | ||
], | ||
"created": "2024-08-02T11:13:50.020Z", | ||
"modified": "2024-08-02T11:14:14.155Z" | ||
}, | ||
"submission": { | ||
"data": { | ||
"checkbox": true, | ||
"submit": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.