mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-16 09:51:16 +00:00
Remove many references to (float)
This commit is contained in:
@@ -104,9 +104,10 @@ class StoreRequest extends FormRequest
|
||||
$validator->after(
|
||||
static function (Validator $validator) {
|
||||
$data = $validator->getData();
|
||||
$min = (float) ($data['amount_min'] ?? 0);
|
||||
$max = (float) ($data['amount_max'] ?? 0);
|
||||
if ($min > $max) {
|
||||
$min = $data['amount_min'] ?? '0';
|
||||
$max = $data['amount_max'] ?? '0';
|
||||
|
||||
if (1 === bccomp($min, $max)) {
|
||||
$validator->errors()->add('amount_min', (string) trans('validation.amount_min_over_max'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user