@assert
@assert
@assert
The @assert attribute in BAML is used for strict validations. If a type fails an @assert validation, it will not be returned in the response, and an exception will be raised if it’s part of the top-level type.
Asserts can be named or unnamed.
Asserts can also be applied to parameters.
Asserts can be used in a block definition, referencing fields within the block.
See Jinja in Attributes for a longer description of the Jinja syntax available in asserts.