| 63 | /// A validation error |
| 64 | #[derive(Debug, Clone, Serialize, Deserialize)] |
| 65 | pub struct ValidationError { |
| 66 | /// Field path that failed validation |
| 67 | pub field_path: String, |
| 68 | /// Error message |
| 69 | pub message: String, |
| 70 | /// Expected value or type |
| 71 | pub expected: Option<String>, |
| 72 | /// Actual value that failed validation |
| 73 | pub actual: Option<String>, |
| 74 | /// Error code for programmatic handling |
| 75 | pub error_code: String, |
| 76 | } |
| 77 | |
| 78 | impl ValidationError { |
| 79 | /// Create a new validation error |
no outgoing calls
no test coverage detected