Fixes #8051 regression

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2020-05-14 00:48:30 -07:00
parent 0550fe0ffa
commit e4385c0f8c
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -27,11 +27,7 @@ class AssetRequest extends Request
*/ */
public function rules() public function rules()
{ {
// Below, asset_tag is duplicated here and in the model, largely because
// the functional tests will fail because of the way Form Requests work in
// Laravel.
$rules = [ $rules = [
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
'name' => 'max:255|nullable', 'name' => 'max:255|nullable',
'model_id' => 'required|integer|exists:models,id', 'model_id' => 'required|integer|exists:models,id',
'status_id' => 'required|integer|exists:status_labels,id', 'status_id' => 'required|integer|exists:status_labels,id',