@@ 20-32 (lines=13) @@ | ||
17 | * |
|
18 | * @since 1.0.0 |
|
19 | */ |
|
20 | class IdVNValidator extends RegularExpressionValidator |
|
21 | { |
|
22 | /** |
|
23 | * {@inheritdoc} |
|
24 | */ |
|
25 | public function init(): void |
|
26 | { |
|
27 | $this->message = $this->message ?? Yii::t('phpviet/validation', '{attribute} must be an id number of Vietnam.'); |
|
28 | $this->pattern = PatternProvider::pregFormat(); |
|
29 | ||
30 | parent::init(); |
|
31 | } |
|
32 | } |
|
33 |
@@ 20-32 (lines=13) @@ | ||
17 | * |
|
18 | * @since 1.0.0 |
|
19 | */ |
|
20 | class LandLineVNValidator extends RegularExpressionValidator |
|
21 | { |
|
22 | /** |
|
23 | * {@inheritdoc} |
|
24 | */ |
|
25 | public function init(): void |
|
26 | { |
|
27 | $this->message = $this->message ?? Yii::t('phpviet/validation', '{attribute} must be a land line phone number of Vietnam.'); |
|
28 | $this->pattern = PatternProvider::pregFormat(); |
|
29 | ||
30 | parent::init(); |
|
31 | } |
|
32 | } |
|
33 |
@@ 20-32 (lines=13) @@ | ||
17 | * |
|
18 | * @since 1.0.0 |
|
19 | */ |
|
20 | class MobileVNValidator extends RegularExpressionValidator |
|
21 | { |
|
22 | /** |
|
23 | * {@inheritdoc} |
|
24 | */ |
|
25 | public function init(): void |
|
26 | { |
|
27 | $this->message = $this->message ?? Yii::t('phpviet/validation', '{attribute} must be a mobile phone number of Vietnam.'); |
|
28 | $this->pattern = PatternProvider::pregFormat(); |
|
29 | ||
30 | parent::init(); |
|
31 | } |
|
32 | } |
|
33 |