AAE-40028 Added improvement to ignore field validation if it is inside a group/section that is hidden (#11362)

* [AAE-40028] Added improvement to ignore field validation if it is inside a group/section that is hidden
This commit is contained in:
Alex Molodyh
2025-12-02 08:30:23 -08:00
committed by GitHub
parent 3287263794
commit 40df22b576
7 changed files with 1383 additions and 9 deletions
+1
View File
@@ -43,6 +43,7 @@ Contains the value and metadata for a field of a [`Form`](../../../lib/process-s
| displayText | string | | Displayed text for Hyperlink widgets |
| isVisible | boolean | true | Is the field shown on the form? |
| visibilityCondition | [`WidgetVisibilityModel`](../../../lib/core/src/lib/form/models/widget-visibility.model.ts) | null | Defines a expression that determines whether the field is visible or not, based on its logical relation to values in other fields |
| checkParentVisibilityForValidation | boolean | false | When enabled (and `FormModel.enableParentVisibilityCheck` is true), validation will be skipped if the field's parent container/group/section is hidden, even if the field itself is visible. |
| enableFractions | boolean | false | Are numeric values allowed to contain a decimal point? |
| currency | string | null | Currency symbol for Amount widgets |
| dateDisplayFormat | string | | Date/time display format template |
+3
View File
@@ -41,6 +41,7 @@ Contains the value and metadata for a form.
|isValid | true||is form valid|
|processVariables| ProcessVariableModel[] | []|process variables|
|variables| FormVariableModel[] | []|variables|
|enableParentVisibilityCheck| boolean | false|Enables checking parent container/group/section visibility for validation. When enabled, fields with `checkParentVisibilityForValidation: true` will skip validation if their parent is hidden.|
## Methods
@@ -112,3 +113,5 @@ Contains the value and metadata for a form.
Changes variable value
- `loadInjectedFieldValidators(injectedFieldValidators: FormFieldValidator[]): void`
Checks it there are any injectedValidators and adds them to the array of field validators.
- `isFieldOrParentHidden(field: FormFieldModel): boolean`
Checks if a field or any of its parent containers/groups/sections is hidden. Returns true if the field should skip validation. Only checks parent visibility if `enableParentVisibilityCheck` is true and the field has `checkParentVisibilityForValidation` set to true.