isCrossFieldExpression
Detects if a ConditionalExpression references other fields (cross-field).
This is the core detection function that handles ALL expression types:
fieldValuewithfieldPath→ Always cross-fieldformValue→ Always cross-fieldjavascriptwithformValue.*in expression → Cross-fieldcustom→ Checks registered function scope, defaults to cross-field if unknownand/or→ Recursively check nested conditions
Presentation
function isCrossFieldExpression (
expr: boolean | ConditionalExpression | FormStateCondition | undefined,
context?: CrossFieldDetectionContext | undefined,
): boolean;Returns
boolean -true if the expression references other fields
Parameters
| Name | Type | Description |
|---|---|---|
| expr | boolean | | The conditional expression to analyze |
| context | | Optional context providing function scope lookup |