fn errno_from_validation_errors(e: &ValidationErrors) -> Option<usize>
Get the error number from validation errors. If multiple errors are present, the first one with a valid error code is used.