forked from aslan/applicant-site
prodV1 #2
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue