Custom ValidationMessages for minDate/maxDate
I have tried the following, but the html5 validation still shows the default browser error. Do i need to about it differently?
DatePicker::configureUsing(function (DatePicker $datePicker) {
return $datePicker->minDate(Carbon::createFromDate(1500, 1, 1))
->maxDate(now()->addYears(9))
->validationMessages([
'after_or_equal' => 'The :attribute must be after January 1, 1500.',
'before_or_equal' => 'The :attribute cannot be more than 9 years in the future.',
]);
});