Ignore:
Timestamp:
10/17/21 20:28:35 (3 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
develop, master
Children:
e6c1f87
Parents:
d795fa6
Message:

added arch_id validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Requests/Dashboard/UsernameSettingsRequest.php

    rd795fa6 rbd9e8e3  
    44
    55use Illuminate\Foundation\Http\FormRequest;
     6use Illuminate\Contracts\Validation\Validator;
     7use Illuminate\Validation\ValidationException;
    68
    79class UsernameSettingsRequest extends FormRequest
     
    2830        ];
    2931    }
     32
     33    protected function failedValidation(Validator $validator)
     34    {
     35        $response = redirect()
     36            ->route('dashboard.settings.index')
     37            ->with(['active_tab' => 'security'])
     38            ->withErrors($validator);
     39
     40        throw (new ValidationException($validator, $response))
     41            ->errorBag($this->errorBag)
     42            ->redirectTo($this->getRedirectUrl());
     43    }
    3044}
Note: See TracChangeset for help on using the changeset viewer.