Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Model
Address
Validator
Postcode.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Model\Address\Validator
;
7
8
class
Postcode
9
{
13
protected
$directoryHelper
;
14
18
public
function
__construct
(\
Magento
\Directory\Helper\
Data
$directoryHelper
)
19
{
20
$this->directoryHelper =
$directoryHelper
;
21
}
22
30
public
function
isValid
($countryId, $postcode)
31
{
32
return
$this->directoryHelper->isZipCodeOptional($countryId) || !empty($postcode);
33
}
34
}
Magento\Directory\Helper\Data
Definition:
Data.php:17
Magento\Customer\Model\Address\Validator\Postcode
Definition:
Postcode.php:8
Magento\Customer\Model\Address\Validator
Definition:
Country.php:6
Magento\Customer\Model\Address\Validator\Postcode\isValid
isValid($countryId, $postcode)
Definition:
Postcode.php:30
Magento
Magento\Customer\Model\Address\Validator\Postcode\__construct
__construct(\Magento\Directory\Helper\Data $directoryHelper)
Definition:
Postcode.php:18
Magento\Customer\Model\Address\Validator\Postcode\$directoryHelper
$directoryHelper
Definition:
Postcode.php:13