adds translations

This commit is contained in:
Godfrey M 2024-07-24 11:39:33 -07:00
parent d01972bbe5
commit d5c9fa823e
2 changed files with 3 additions and 2 deletions

View file

@ -69,7 +69,7 @@ class DepreciationsController extends Controller
'numeric',
function ($attribute, $value, $fail) use ($request) {
if ($request->input('depreciation_type') == 'percent' && ($value < 0 || $value > 100)) {
$fail('The depreciation minimum must be between 0 and 100 when depreciation type is percentage.');
$fail(trans('validation.percent'));
}
},
],
@ -137,7 +137,7 @@ class DepreciationsController extends Controller
'numeric',
function ($attribute, $value, $fail) use ($request) {
if ($request->input('depreciation_type') == 'percent' && ($value < 0 || $value > 100)) {
$fail('The depreciation minimum must be between 0 and 100 when depreciation type is percentage.');
$fail(trans('validation.percent'));
}
},
],

View file

@ -72,6 +72,7 @@ return [
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'present' => 'The :attribute field must be present.',
'percent' => 'The depreciation minimum must be between 0 and 100 when depreciation type is percentage.',
'valid_regex' => 'That is not a valid regex. ',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',