Log in
Model

Country

Magento\Customer\Model\Address\Validator\Country

What it does

This validator class ensures that customer addresses have valid country and region data according to Magento's directory configuration.

Developers use this class when validating customer address submissions to verify that the selected country is allowed for the website and that required regions are properly specified.

It automatically checks if a region is mandatory for the selected country and validates region IDs against the available regions list.

Public Methods

  • validate()