macro_rules! field_err {
($field:literal, $code:literal, $errors:expr) => { ... };
($field:literal, $code:literal, $message:literal, $errors:expr) => { ... };
($field:literal, $code:literal, $message:expr, $errors:expr) => { ... };
}Expand description
Designed to be used with the schema_validation proc macro. Used for ergonomic custom error handling.
Adds a field validaton error to the generated ValidationErrors
The errors argument should pass in an instance of ValidationErrors,
and usually is used with the one generated from schema_validation.
Accepts:
("field_name", "code", errors)
("field_name", "code", "custom message", errors)