Skip to main content

parse_input_validation_errors

Function parse_input_validation_errors 

Source
pub fn parse_input_validation_errors(
    err: &AkribesError,
) -> Option<Vec<InputValidationEntry>>
Expand description

Parse a 400 input_validation_failed body off an AkribesError::HttpStatus. Returns None when the error is something else or the body doesn’t match.

Mirrors TS tryParseInputValidationErrors (#1017). Form-style UIs use this to map per-field errors back to inputs without regex-matching the text message.