mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Ensure at the model level that location.id/user.id and location.parent_id/user.manager_id cannot be the same
This commit is contained in:
parent
5dc64ea91b
commit
c02adace61
|
@ -26,7 +26,8 @@ class Location extends SnipeModel
|
|||
'address' => 'max:80|nullable',
|
||||
'address2' => 'max:80|nullable',
|
||||
'zip' => 'min:3|max:10|nullable',
|
||||
'manager_id' => 'exists:users,id|nullable'
|
||||
'manager_id' => 'exists:users,id|nullable',
|
||||
'parent_id' => 'nullable|different:id',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -71,6 +71,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
'password' => 'required|min:8',
|
||||
'locale' => 'max:10|nullable',
|
||||
'website' => 'url|nullable',
|
||||
'manager_id' => 'nullable|different:id',
|
||||
];
|
||||
|
||||
use Searchable;
|
||||
|
|
Loading…
Reference in a new issue