mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Update validation in AssetRequest form request
This commit is contained in:
parent
e5286229e0
commit
8ad509d7f1
|
@ -29,16 +29,16 @@ class AssetRequest extends Request
|
|||
'name' => 'min:2|max:255',
|
||||
'model_id' => 'required|integer',
|
||||
'status_id' => 'required|integer',
|
||||
'company_id' => 'integer',
|
||||
'warranty_months' => 'integer|min:0|max:240',
|
||||
'physical' => 'integer',
|
||||
'company_id' => 'integer|nullable',
|
||||
'warranty_months' => 'numeric|nullable',
|
||||
'physical' => 'integer|nullable',
|
||||
'checkout_date' => 'date',
|
||||
'checkin_date' => 'date',
|
||||
'supplier_id' => 'integer',
|
||||
'status' => 'integer',
|
||||
'supplier_id' => 'integer|nullable',
|
||||
'status' => 'integer|nullable',
|
||||
'asset_tag' => 'required',
|
||||
'purchase_cost' => 'numeric',
|
||||
|
||||
'purchase_cost' => 'numeric|nullable',
|
||||
|
||||
];
|
||||
|
||||
$model = AssetModel::find($this->request->get('model_id'));
|
||||
|
|
|
@ -51,7 +51,7 @@ class AssetsCest
|
|||
'rtd_location_id' => $asset->rtd_location_id,
|
||||
'requestable' => $asset->requestable,
|
||||
];
|
||||
///print_r($values);
|
||||
|
||||
$I->wantTo("Test Validation Succeeds");
|
||||
$I->amOnPage(route('hardware.create'));
|
||||
$I->submitForm('form#create-form', $values);
|
||||
|
|
Loading…
Reference in a new issue