test: auth exception 6

This commit is contained in:
saparatayev 2021-11-05 17:23:37 +05:00
parent b13f423071
commit efc1d53ba0
5 changed files with 7 additions and 1 deletions

View File

@ -133,6 +133,7 @@ return [
'iu_about_digits' => 'Legalization number must contain 6 digits.',
'iu_company_max' => 'Company name cannot exceed 191 characters.',
],
'no_user' => 'A user was not found.',
/*
|--------------------------------------------------------------------------

View File

@ -133,6 +133,7 @@ return [
'iu_about_digits' => 'Номер легализации должен содержать 6 цифр.',
'iu_company_max' => 'Название компании не должно превышать 191 символ.',
],
'no_user' => 'Пользователь не найден.',
/*
|--------------------------------------------------------------------------

View File

@ -135,6 +135,7 @@ return [
'iu_about_digits' => 'Legalizasiýa nomeri 6 sany sandan ybarat bolmaly.',
'iu_company_max' => 'Kompaniýanyň ady 191 sany harpdan geçmeli däl.',
],
'no_user' => 'Beýle ulanyjy ýok.',
/*
|--------------------------------------------------------------------------

View File

@ -266,7 +266,7 @@ class Account extends ComponentBase
}
catch (Exception $ex) {
if ($ex instanceof AuthException) {
throw new Exception('Txtttstts');
throw new ValidationException(['no_user' => trans('validation.no_user')]);
}
// if (Request::ajax()) throw $ex;

View File

@ -5,6 +5,9 @@
<div class="form_text">
{{ 'auth.account_recov'|_ }}
</div>
<div>
<span class="error_span t-c" data-validate-for="no_user" style="color: red;"></span>
</div>
<div class="register_input">
<input type="text" name="username" placeholder="{{'auth.phone'|_}}">
<div data-validate-for="username"></div>