Using Server side validation based on https://github.com/sirprize/postal-code-validator
Using Server side validation based on https://github.com/sirprize/postal-code-validator, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist jberall/yii2-postal-code-validator "*"
or add, (*4)
"jberall/yii2-postal-code-validator": "*"
to the require section of your composer.json file., (*5)
composer.json
Once the extension is installed, simply use it in your code by :, (*6)
php <?= \jberall\postalcodevalidator\AutoloadExample::widget(); ?>, (*7)
php <?= \jberall\postalcodevalidator\AutoloadExample::widget(); ?>
Sources Download
MIT
extension yii2 postal code zip code validation