(ctx: &mut ValidationContext, field: &str, value: &str)
| 117 | } |
| 118 | |
| 119 | fn check_description_field(ctx: &mut ValidationContext, field: &str, value: &str) { |
| 120 | if value.chars().count() < 1 { |
| 121 | ctx.push_field_error(field, "has to be atleast 1 character".to_string()); |
| 122 | } |
| 123 | if value.chars().count() > 100 { |
| 124 | ctx.push_field_error(field, "can be max 100 characters long".to_string()); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | impl Validator for SettingsOptionDefinition { |
| 129 | type ContextData = (); |
no test coverage detected