Skip to content

format validation error from code

Mojo function 🡭

fn format_validation_error_from_code(code: FastxErrorCode, record_number: Int, field: String = "", record_snippet: String = "") -> String

Build full ValidationError string from error code and context (cold path).

Returns the full formatted error string, including contextual lines such as “Record number”, “Field”, and “Record snippet” when that information is available.

Args:

  • code (FastxErrorCode)
  • record_number (Int)
  • field (String)
  • record_snippet (String)

Returns:

String