MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / validate_duration_format

Function validate_duration_format

graphlite/src/ast/validator.rs:2066–2075  ·  view source on GitHub ↗

Validate duration format

(dur: &str, errors: &mut Vec<ValidationError>)

Source from the content-addressed store, hash-verified

2064
2065/// Validate duration format
2066fn validate_duration_format(dur: &str, errors: &mut Vec<ValidationError>) {
2067 // Basic ISO duration format validation
2068 if !dur.starts_with('P') {
2069 errors.push(ValidationError {
2070 message: "Duration must be in ISO 8601 format (P1Y2M3DT4H5M6S)".to_string(),
2071 location: None,
2072 error_type: ValidationErrorType::Syntax,
2073 });
2074 }
2075}
2076
2077/// Validate time window format
2078fn validate_timewindow_format(tw: &str, errors: &mut Vec<ValidationError>) {

Callers 1

validate_literalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected