MCPcopy Create free account
hub / github.com/dfinity/orbit / validate_title

Function validate_title

core/station/impl/src/models/request.rs:97–108  ·  view source on GitHub ↗
(title: &str)

Source from the content-addressed store, hash-verified

95}
96
97fn 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
110fn validate_summary(summary: &Option<String>) -> ModelValidatorResult<RequestError> {
111 if let Some(summary) = summary {

Callers 3

validateMethod · 0.70

Calls 1

lenMethod · 0.45

Tested by 2