From 0ce1eebd31ed4b4acf84a7643fd99d13e44edbe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:20:44 +0300 Subject: [PATCH] added double validation message --- app/Abstracts/Export.php | 4 ++-- resources/lang/en-GB/validation.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Abstracts/Export.php b/app/Abstracts/Export.php index ab6ff5b50..b7a73e55d 100644 --- a/app/Abstracts/Export.php +++ b/app/Abstracts/Export.php @@ -210,7 +210,7 @@ abstract class Export implements FromCollection, HasLocalePreference, ShouldAuto } if (strpos($r, 'amount') !== false) { - $r = 'integer'; + $r = 'double'; } if (strpos($r, 'date_format') !== false) { @@ -227,7 +227,7 @@ abstract class Export implements FromCollection, HasLocalePreference, ShouldAuto ]) . ' '; } - if (in_array($r, ['required', 'email', 'integer', 'unique', 'date_format'])) { + if (in_array($r, ['required', 'email', 'integer', 'unique', 'date_format', 'double'])) { $prompt = $prompt . trans('validation.' . $r, ['attribute' => $value]) . ' '; } } diff --git a/resources/lang/en-GB/validation.php b/resources/lang/en-GB/validation.php index 1d35b5917..4ffe075a3 100644 --- a/resources/lang/en-GB/validation.php +++ b/resources/lang/en-GB/validation.php @@ -44,6 +44,7 @@ return [ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', + 'double' => 'The :attribute must be a valid double.', 'email' => 'The :attribute must be a valid email address.', 'ends_with' => 'The :attribute must end with one of the following: :values.', 'enum' => 'The selected :attribute is invalid.',