mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
fixes for validation
This commit is contained in:
parent
4ff0108c5c
commit
976f610158
@ -47,14 +47,10 @@ class InvitationController extends Controller
|
||||
|
||||
$entity_obj = 'App\Models\\'.ucfirst(Str::camel($entity)).'Invitation';
|
||||
|
||||
nlog($entity);
|
||||
nlog($entity_obj);
|
||||
|
||||
$invitation = $entity_obj::whereRaw('BINARY `key`= ?', [$invitation_key])
|
||||
->with('contact.client')
|
||||
->firstOrFail();
|
||||
|
||||
nlog($invitation->getLink());
|
||||
|
||||
/* Return early if we have the correct client_hash embedded */
|
||||
|
||||
|
@ -39,9 +39,9 @@ class StoreUserRequest extends Request
|
||||
$rules['last_name'] = 'required|string|max:100';
|
||||
|
||||
if (config('ninja.db.multi_db_enabled')) {
|
||||
$rules['email'] = ['email:rfc,dns', new ValidUserForCompany(), Rule::unique('users')];
|
||||
$rules['email'] = ['email', new ValidUserForCompany(), Rule::unique('users')];
|
||||
} else {
|
||||
$rules['email'] = ['email:rfc,dns',Rule::unique('users')];
|
||||
$rules['email'] = ['email',Rule::unique('users')];
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ class UpdateUserRequest extends Request
|
||||
];
|
||||
|
||||
if (isset($input['email'])) {
|
||||
$rules['email'] = ['email:rfc,dns', 'sometimes', new UniqueUserRule($this->user, $input['email'])];
|
||||
$rules['email'] = ['email', 'sometimes', new UniqueUserRule($this->user, $input['email'])];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
|
Loading…
x
Reference in New Issue
Block a user