any fix direction profile
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m44s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 31s Details

This commit is contained in:
aslan 2024-03-12 12:45:22 +03:00
parent 66fdb9d7b0
commit 2c32dd8667
2 changed files with 14 additions and 4 deletions

View File

@ -14,9 +14,19 @@ class UpdateDirectionProfileRequest extends FormRequest
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255', "unique:direction_profiles,name,{$this->direction_profile->id}",],
'name' => [
'required',
'string',
'max:255',
"unique:direction_profiles,name,{$this->direction_profile->id}"
],
'description' => 'nullable|string',
'slug' => ['required', 'string', 'max:255', "unique:direction_profiles,slug,{$this->direction_profile->id}",],
'slug' => [
'required',
'string',
'max:255',
"unique:direction_profiles,slug,{$this->direction_profile->id}"
],
'position' => 'required|int|numeric|max:255',
];
}

View File

@ -12,12 +12,12 @@
<span class="text-danger">*</span>
</div>
<div class="mt-1">
{{ Form::text('position', PositionHelper::faculty(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }}
{{ Form::text('position', PositionHelper::directionProfile(), ['class' => 'form-control', 'data-bs-toggle' => "tooltip", 'data-bs-title' => __('tooltips.direction_profiles.position'), 'required']) }}
<div class="invalid-feedback">
Поле "Позиция" обязательно!
</div>
</div>
<div>
<div class="text-danger">
@if ($errors->any())
{{ $errors->first('position') }}
@endif