HttpValidationResponseMapping
@ng-forge/dynamic-forms
Mapping configuration for interpreting HTTP responses as validation results.
Expressions in validWhen and errorParams are evaluated with scope { response } only —
they do NOT have access to formValue, fieldValue, or the full EvaluationContext.
This is intentional for v1: response mapping is purely about interpreting the HTTP response.
Signature
interface HttpValidationResponseMappingProperties
| Name | Type | Description |
|---|---|---|
validWhen | string | Expression evaluated with scope NOTE: This is the OPPOSITE of the function-based HttpCustomValidator.onSuccess
convention, which maps successful HTTP responses to validation errors.
Here, |
errorKind | string | Error kind returned when validation fails — maps to field-level validationMessages |
errorParams ? | Record<string, string> | Parameters to include in the validation error for message interpolation.
Map of parameter names to expressions evaluated against |
packages/dynamic-forms/src/lib/models/http/http-response-mapping.ts:8