Expand description
Generic input validation helpers for AWS-compatible error responses.
All validators return AwsServiceError with ValidationException and 400 status.
Functions§
- parse_
optional_ i64_ param - Parse a string as an i64 for range validation, returning a
ValidationExceptionwhen the value is present but not a valid integer. - 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_ json_ range - Validate an optional numeric JSON value is within [min, max].
- 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].