translation strings

This commit is contained in:
spencerrlongg 2024-04-07 19:50:53 -05:00
parent f30439a544
commit 99d7155729
2 changed files with 4 additions and 3 deletions

View file

@ -28,9 +28,9 @@ trait MayContainCustomFields
$request_fields->diff($asset_model->fieldset->fields->pluck('db_column'))
->each(function ($request_field_name) use ($request_fields, $validator) {
if (CustomField::where('db_column', $request_field_name)->exists()) {
$validator->errors()->add($request_field_name, 'This field seems to exist, but is not available on this Asset Model\'s fieldset.');
$validator->errors()->add($request_field_name, trans('validation.custom.custom_field_not_found_on_model'));
} else {
$validator->errors()->add($request_field_name, 'This field does not seem to exist, please double check your custom field names.');
$validator->errors()->add($request_field_name, trans('validation.custom.custom_field_not_found'));
}
});
}

View file

@ -126,6 +126,8 @@ return [
'hashed_pass' => 'Your current password is incorrect',
'dumbpwd' => 'That password is too common.',
'statuslabel_type' => 'You must select a valid status label type',
'custom_field_not_found' => 'This field does not seem to exist, please double check your custom field names.',
'custom_field_not_found_on_model' => 'This field seems to exist, but is not available on this Asset Model\'s fieldset.',
// date_format validation with slightly less stupid messages. It duplicates a lot, but it gets the job done :(
// We use this because the default error message for date_format is reflects php Y-m-d, which non-PHP
@ -137,7 +139,6 @@ return [
'expected_checkin.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
'start_date.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
'end_date.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
],
/*