(field: &str, value: &str, max_len: usize)
| 225 | |
| 226 | #[allow(clippy::result_large_err)] |
| 227 | fn validate_endpoint_name(field: &str, value: &str, max_len: usize) -> Result<(), Status> { |
| 228 | if value.is_empty() { |
| 229 | return Err(Status::invalid_argument(format!("{field} is required"))); |
| 230 | } |
| 231 | validate_non_empty_endpoint_name(field, value, max_len) |
| 232 | } |
| 233 | |
| 234 | #[allow(clippy::result_large_err)] |
| 235 | fn validate_optional_endpoint_name(field: &str, value: &str, max_len: usize) -> Result<(), Status> { |