Skip to main content

validate_format

Function validate_format 

Source
pub fn validate_format(value: &str, format: &str) -> bool
Expand description

Validate a string value against a named format.

Returns true if the value satisfies the format, or if the format is unknown (unknown formats are treated as always valid, matching JSON Schema behaviour).