Auto commit for release 'develop' on 2024-08-05

This commit is contained in:
github-actions
2024-08-05 05:06:53 +02:00
parent d2e9b64bf5
commit ed265f68ba
32 changed files with 574 additions and 564 deletions

View File

@@ -35,17 +35,18 @@ class IsValidDateRange implements ValidationRule
*/
public function validate(string $attribute, mixed $value, \Closure $fail): void
{
$value = (string) $value;
$value = (string) $value;
if ('' === $value) {
$fail('validation.date_or_time')->translate();
return;
}
$other = 'startPeriod';
$other = 'startPeriod';
if ('startPeriod' === $attribute) {
$other = 'endPeriod';
}
$otherValue = request()->get($other);
// parse date, twice.
try {
$left = Carbon::parse($value);
@@ -68,6 +69,7 @@ class IsValidDateRange implements ValidationRule
if ($left->gt($right)) {
$fail('validation.date_after')->translate();
}
return;
}
// end must be after start
@@ -76,4 +78,3 @@ class IsValidDateRange implements ValidationRule
}
}
}