any fix direction profile
This commit is contained in:
parent
66fdb9d7b0
commit
2c32dd8667
|
@ -14,9 +14,19 @@ class UpdateDirectionProfileRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
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',
|
'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',
|
'position' => 'required|int|numeric|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1">
|
<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 class="invalid-feedback">
|
||||||
Поле "Позиция" обязательно!
|
Поле "Позиция" обязательно!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-danger">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
{{ $errors->first('position') }}
|
{{ $errors->first('position') }}
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Reference in New Issue