Skip to content

Commit 9c9d4ba

Browse files
committed
feat: add validation for expected close date in lead form
1 parent f4b7dfc commit 9c9d4ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/Webkul/Admin/src/Http/Requests/LeadForm.php

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Webkul\Attribute\Repositories\AttributeRepository;
77
use Webkul\Attribute\Repositories\AttributeValueRepository;
88
use Webkul\Core\Contracts\Validations\Decimal;
9+
use Carbon\Carbon;
910

1011
class LeadForm extends FormRequest
1112
{
@@ -127,6 +128,11 @@ public function rules()
127128
}
128129
}
129130

131+
$this->rules['expected_close_date'] = [
132+
'date_format:Y-m-d',
133+
'after:' . Carbon::yesterday()->format('Y-m-d'),
134+
];
135+
130136
return [
131137
...$this->rules,
132138
'products' => 'array',

0 commit comments

Comments
 (0)