1: <?php
2: /**
3: * Wei Framework
4: *
5: * @copyright Copyright (c) 2008-2015 Twin Huang
6: * @license http://opensource.org/licenses/mit-license.php MIT License
7: */
8:
9: namespace Wei\Validator;
10:
11: /**
12: * Check if the input is valid Chinese postcode
13: *
14: * @author Twin Huang <twinhuang@qq.com>
15: */
16: class PostcodeCn extends Regex
17: {
18: protected $patternMessage = '%name% must be six length of digit';
19:
20: protected $negativeMessage = '%name% must not be postcode';
21:
22: protected $pattern = '/^[1-9][\d]{5}$/';
23: }
24: