Hi iam developing an application using laravel is there any way to make an input date field greater than or equal to another date field using validation.
I know that i can achieve this through jquery and i have already got that working, but i want to know whether is this achievable through laravel validation since laravel has got some predefined validations.
For Example
protected $validationRules = array
(
'a' => 'date',
'b' => 'date|(some validation so that the b value is greater than or equal to that of 'a')'
);
EDIT
If there is any other approach to solve the problem using laravel concept please tell me
I tried
Validator::extend('val_date', function ($attribute,$value,$parameters) {
return preg_match("between [start date] and DateAdd("d", 1, [end date])",$value);
});
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…