Record of property names to their schema types
Expected input type for these properties
Output type after validation and transformation
Output type with camelCase property names
Creates a new GroupConditional with a condition and properties.
Record of property names to their schema types
Expected input type for these properties
Output type after validation and transformation
Output type with camelCase property names
Function that returns truthy value when properties should be validated
Properties to validate and merge when condition is true
Converts the conditional properties to JSON Schema format.
JSON Schema representation of this conditional's properties
Compiles the conditional to a compiler node for validation.
Reference store for the compiler
Parser options
Compiled conditional node
GroupConditional represents a subset of object properties that are conditionally validated and merged based on a runtime condition. This allows schemas to have different required fields depending on the values in the object being validated.
Example