Skip to main content

Module validation

Module validation 

Source
Expand description

Generic input validation helpers for AWS-compatible error responses.

All validators return AwsServiceError with ValidationException and 400 status.

Functions§

validate_enum
Validate a string is one of the allowed enum values.
validate_optional_enum
Validate an optional enum value if present.
validate_optional_enum_value
Validate an optional enum from a JSON value, rejecting non-string types.
validate_optional_range_i64
Validate an optional integer range if present.
validate_optional_string_length
Validate an optional string’s length if present.
validate_range_i64
Validate an integer is within [min, max].
validate_required
Validate that a required field is present (not null/missing).
validate_string_length
Validate a string’s length is within [min, max].