Skip to main content

validate_base64_urlsafe

Function validate_base64_urlsafe 

Source
pub fn validate_base64_urlsafe(s: &str) -> Result<(), ValidationError>
Expand description

Validate that s is a well-formed URL-safe base64 string: characters from [A-Za-z0-9_-], length a multiple of 4 after optional = padding (or, by RFC 4648 convention, padding may be omitted in URL-safe encoding — we accept either).

§Errors

ValidationError { code: "invalid_base64", ... }.