pub fn validate_fields(
fields: &[FieldRules],
data: &HashMap<String, String>,
mode: Mode,
) -> ErrorBagExpand description
Runs the cheap, non-database rules over data for mode, returning the error
bag. Rule::Unique needs the database and is ignored here; use validate
to include it. Exposed on its own for callers that want a DB-free check (for
example an API validating a payload before any query).