@@ -32,6 +32,8 @@ You can access to validation rules by passing the rules key according blew follo
3232| persian_alpha_num | Persian alphabet and numbers |صادق۱۲۳۴
3333| persian_alpha_eng_num | Persian alphabet and numbers with english numbers |صادق۱۲34
3434| persian_not_accept | Doesn't accept Persian alphabet and numbers | cant be persian
35+ | shamsi_date | Check shamsi (jalali) date with format(Y/m/d) | 1373/3/19
36+ | shamsi_date_between:1300,1400 | Check shamsi (jalali) date with format(Y/m/d) between years | 1373/3/19
3537| ir_mobile | Iranian mobile numbers | 00989173456789, +989173456789, 989173456789, 09173456789, 91712345678
3638| ir_phone | Iranian phone numbers | 37236445
3739| ir_phone_code | Iranian phone area code | 077, 021, ...
@@ -47,7 +49,7 @@ You can access to validation rules by passing the rules key according blew follo
4749### Persian Alpha
4850Accept Persian language alphabet according to standard Persian, this is the way you can use this validation rule:
4951
50- ```
52+ ``` php
5153$input = [ 'فارسی' ];
5254
5355$rules = [ 'persian_alpha' ];
@@ -58,7 +60,7 @@ Validator::make( $input, $rules );
5860### Persian numbers
5961Validate Persian standard numbers (۰۱۲۳۴۵۶۷۸۹):
6062
61- ```
63+ ``` php
6264$input = [ '۰۱۲۳۴۵۶۷۸۹' ];
6365
6466$rules = [ 'persian_num' ];
@@ -69,7 +71,7 @@ Validator::make( $input, $rules );
6971### Persian Alpha Num
7072Validate Persian alpha num:
7173
72- ```
74+ ``` php
7375$input = [ '۰فارسی۱۲۳۴۵۶۷۸۹' ];
7476
7577$rules = [ 'persian_alpha_num' ];
@@ -80,18 +82,40 @@ Validator::make( $input, $rules );
8082### Persian Alpha Eng Num
8183Validate Persian alpha num with english num:
8284
83- ```
85+ ``` php
8486$input = [ '۰فارسی۱۲۳۴۵6789' ];
8587
8688$rules = [ 'persian_alpha_eng_num' ];
8789
8890Validator::make( $input, $rules );
8991```
9092
93+ ### Shamsi Date
94+ Validate shamsi (jalali) date:
95+
96+ ``` php
97+ $input = [ '1373/3/19' ];
98+
99+ $rules = [ 'shamsi_date' ];
100+
101+ Validator::make( $input, $rules );
102+ ```
103+
104+ ### Shamsi Date Between
105+ Validate shamsi (jalali) date between years:
106+
107+ ``` php
108+ $input = [ '1373/3/19' ];
109+
110+ $rules = [ 'shamsi_date_between:1300,1400' ];
111+
112+ Validator::make( $input, $rules );
113+ ```
114+
91115### Iran mobile phone
92116Validate Iranian mobile numbers (Irancell, Rightel, Hamrah-e-aval, ...):
93117
94- ```
118+ ``` php
95119$input = [ '09381234567' ];
96120
97121$rules = [ 'ir_mobile' ];
@@ -102,7 +126,7 @@ Validator::make( $input, $rules );
102126### Sheba number
103127Validate Iranian bank sheba numbers:
104128
105- ```
129+ ``` php
106130$input = [ 'IR062960000000100324200001' ];
107131
108132$rules = [ 'ir_sheba' ];
@@ -113,7 +137,7 @@ Validator::make( $input, $rules );
113137### Iran national code
114138Validate Iranian national code (Melli Code):
115139
116- ```
140+ ``` php
117141$input = [ '3240175800' ];
118142
119143$rules = [ 'ir_national_code' ];
@@ -124,7 +148,7 @@ Validator::make( $input, $rules );
124148### Payment card number
125149Validate Iranian bank payment card numbers:
126150
127- ```
151+ ``` php
128152$input = [ '6274129005473742' ];
129153
130154$rules = [ 'ir_card_number' ];
@@ -135,7 +159,7 @@ Validator::make( $input, $rules );
135159### Iran postal code
136160Validate Iranian postal code:
137161
138- ```
162+ ``` php
139163$input = [ '167197-35744' ];
140164
141165$rules = [ 'ir_postal_code' ];
@@ -166,6 +190,10 @@ Validator::make( $request->all(), [
166190
167191 'address' => 'persian_alpha_eng_num', // Validate persian alphabet & numbers with english numbers
168192
193+ 'birthday' => 'shamsi_date', // Validate shamsi date
194+
195+ 'start_date' => 'shamsi_date_between:1300,1400', // Validate shamsi date between years
196+
169197 'mobile' => 'ir_mobile', // Validate mobile number
170198
171199 'sheba_number' => 'ir_sheba', // Validate sheba number of bank account
0 commit comments