(&mut self, field: &str, msg: impl Into<String>)
| 53 | |
| 54 | impl ValidationContext { |
| 55 | fn push_field_error(&mut self, field: &str, msg: impl Into<String>) { |
| 56 | let mut prefix = self.field_stack.join("."); |
| 57 | if !prefix.is_empty() { |
| 58 | prefix.push('.'); |
| 59 | } |
| 60 | |
| 61 | self.errs.push(ValidationError { |
| 62 | field: format!("{prefix}{field}"), |
| 63 | msg: msg.into(), |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | fn push_error(&mut self, msg: impl Into<String>) { |
| 68 | let fields = self.field_stack.join("."); |
no outgoing calls
no test coverage detected