Commit f0628fd4610da1e0b388765383b8285744b614cf
1 parent
e1cd480e5d
Exists in
master
fix worker register
Showing 2 changed files with 2 additions and 3 deletions Side-by-side Diff
app/Http/Controllers/WorkerController.php
... | ... | @@ -582,7 +582,7 @@ class WorkerController extends Controller |
582 | 582 | 'password' => ['required', 'string', 'min:6'], |
583 | 583 | 'password_confirmation' => ['required', 'same:password'], |
584 | 584 | 'politik' => ['required', 'accepted'], |
585 | - 'job_titles' => ['required', 'numeric'] | |
585 | + 'job_titles' => ['nullable'] | |
586 | 586 | ]; |
587 | 587 | |
588 | 588 | $messages = [ |
... | ... | @@ -594,7 +594,6 @@ class WorkerController extends Controller |
594 | 594 | 'string' => 'Поле должно быть не менее :min символов', |
595 | 595 | ], |
596 | 596 | 'accepted' => 'Необходимо согласиться с политикой конфиденциальности', |
597 | - 'numeric' => 'Укажите обязательное поле', | |
598 | 597 | ]; |
599 | 598 | |
600 | 599 | $validator = Validator::make($request->all(), $rules, $messages); |
resources/views/modals/register.blade.php
... | ... | @@ -103,7 +103,7 @@ |
103 | 103 | <div class="form-group__item"> |
104 | 104 | <div class="select"> |
105 | 105 | <select class="js-select2" name="job_titles" id="job_titles_worker"> |
106 | - <option selected>Не указано</option> | |
106 | + <option value="" selected>Не указано</option> | |
107 | 107 | @if ($Job_titles->count()) |
108 | 108 | @foreach($Job_titles as $it) |
109 | 109 | <option value="{{ $it->id }}">{{ $it->name }}</option> |