Update validation in AssetRequest form request

This commit is contained in:
snipe 2016-12-15 15:24:55 -08:00
parent e5286229e0
commit 8ad509d7f1
2 changed files with 8 additions and 8 deletions

View file

@ -29,16 +29,16 @@ class AssetRequest extends Request
'name' => 'min:2|max:255', 'name' => 'min:2|max:255',
'model_id' => 'required|integer', 'model_id' => 'required|integer',
'status_id' => 'required|integer', 'status_id' => 'required|integer',
'company_id' => 'integer', 'company_id' => 'integer|nullable',
'warranty_months' => 'integer|min:0|max:240', 'warranty_months' => 'numeric|nullable',
'physical' => 'integer', 'physical' => 'integer|nullable',
'checkout_date' => 'date', 'checkout_date' => 'date',
'checkin_date' => 'date', 'checkin_date' => 'date',
'supplier_id' => 'integer', 'supplier_id' => 'integer|nullable',
'status' => 'integer', 'status' => 'integer|nullable',
'asset_tag' => 'required', 'asset_tag' => 'required',
'purchase_cost' => 'numeric', 'purchase_cost' => 'numeric|nullable',
]; ];
$model = AssetModel::find($this->request->get('model_id')); $model = AssetModel::find($this->request->get('model_id'));

View file

@ -51,7 +51,7 @@ class AssetsCest
'rtd_location_id' => $asset->rtd_location_id, 'rtd_location_id' => $asset->rtd_location_id,
'requestable' => $asset->requestable, 'requestable' => $asset->requestable,
]; ];
///print_r($values);
$I->wantTo("Test Validation Succeeds"); $I->wantTo("Test Validation Succeeds");
$I->amOnPage(route('hardware.create')); $I->amOnPage(route('hardware.create'));
$I->submitForm('form#create-form', $values); $I->submitForm('form#create-form', $values);