(title: &str)
| 95 | } |
| 96 | |
| 97 | fn validate_title(title: &str) -> ModelValidatorResult<RequestError> { |
| 98 | if title.len() > Request::MAX_TITLE_LEN as usize { |
| 99 | return Err(RequestError::ValidationError { |
| 100 | info: format!( |
| 101 | "Request title length exceeds the maximum allowed: {}", |
| 102 | Request::MAX_TITLE_LEN |
| 103 | ), |
| 104 | }); |
| 105 | } |
| 106 | |
| 107 | Ok(()) |
| 108 | } |
| 109 | |
| 110 | fn validate_summary(summary: &Option<String>) -> ModelValidatorResult<RequestError> { |
| 111 | if let Some(summary) = summary { |