Log in
Model

Validator

Magento\Directory\Model\Country\Postcode\Validator

What it does

This class validates postal codes against country-specific format patterns defined in the system configuration.

Developers use this validator when processing addresses during checkout, customer registration, or any form that requires postal code validation to ensure the entered postcode matches the expected format for a given country.

Public Methods

  • validate()