Skip to content

ParseError

Gatepost\Postcode\ParseError

The reason for a failed parse. It is a value, not an exception: Postcode::parse() returns it inside a ParseResult.

  • ParseErrorCode $code: The reason, as a stable code.
  • ?Precision $segment: The failing segment, for UnknownState and BadSegment only.
  • ?string $suggestion: The canonical form of one fixed code, or null. It is a hint only.

Unofficial. Not made or endorsed by NIPOST.