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

Function validate_datetime_format

graphlite/src/ast/validator.rs:2054–2063  ·  view source on GitHub ↗

Validate datetime format

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

Source from the content-addressed store, hash-verified

2052
2053/// Validate datetime format
2054fn validate_datetime_format(dt: &str, errors: &mut Vec<ValidationError>) {
2055 // Basic ISO 8601 format validation
2056 if !dt.contains('T') {
2057 errors.push(ValidationError {
2058 message: "DateTime must be in ISO 8601 format (YYYY-MM-DDTHH:MM:SS)".to_string(),
2059 location: None,
2060 error_type: ValidationErrorType::Syntax,
2061 });
2062 }
2063}
2064
2065/// Validate duration format
2066fn validate_duration_format(dur: &str, errors: &mut Vec<ValidationError>) {

Callers 1

validate_literalFunction · 0.85

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected