Created
March 26, 2016 20:27
-
-
Save Edofre/75fc878e5b51bef47186 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace common\components\validators; | |
class ZipCodeValidator extends \yii\validators\RegularExpressionValidator | |
{ | |
public $pattern = '/^[0-9]{4} {0,1}[a-z|A-Z]{2}$/'; // 1234AB or 1234 AB | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment