Skip to main content

Module validate

Module validate 

Source

Enums§

AccessRuleValidationError
Errors returned when a locally-constructed AccessRuleAddEditRequest fails validation before being sent to the server.

Constants§

MAX_CONDITIONS 🔒
Maximum number of conditions allowed on a single access rule.
MAX_NAME_LENGTH 🔒
Maximum length of an access rule’s name field, matching the server’s constraint.

Functions§

is_valid_cidr
Returns true when value is a CIDR range in canonical form: address/prefix where the address parses strictly (RFC dotted-quad IPv4 / RFC 4291 IPv6, no leading-zero octets, hex octets, partial addresses, or zone IDs), the prefix is a plain decimal integer in range, and no host bits are set (e.g. 10.0.0.0/8 is valid, 10.0.0.1/8 is not).
no_host_bits 🔒
Returns true when the low width - prefix host bits of addr are all zero.
validate_request
Validates a request before it is sent to the server. Unknown condition kinds are skipped - the server is the source of truth for validating condition kinds this SDK version doesn’t model.