prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
2 changed files with 14 additions and 4 deletions
Showing only changes of commit 2c32dd8667 - Show all commits

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