Validate duration format
(dur: &str, errors: &mut Vec<ValidationError>)
| 2064 | |
| 2065 | /// Validate duration format |
| 2066 | fn 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 |
| 2078 | fn validate_timewindow_format(tw: &str, errors: &mut Vec<ValidationError>) { |