Skip to content

Commit

Permalink
Serial should be unique for hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Dec 3, 2013
1 parent aaebaa8 commit b97f5fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function postEdit($assetId = null)
'name' => 'alpha_space|min:3',
'asset_tag' => 'required|alpha_space|min:3',
'model_id' => 'required',
'serial' => 'alpha_space|min:3',
'serial' => 'alpha_space|min:3|unique:assets',
'warranty_months' => 'integer',
'notes' => 'alpha_space',
);
Expand Down
2 changes: 1 addition & 1 deletion app/models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Asset extends Elegant {
'name' => 'alpha_space',
'asset_tag' => 'required|alpha_space|min:3|unique:assets',
'model_id' => 'required',
'serial' => 'alpha_dash|min:3',
'serial' => 'alpha_dash|min:3|unique:assets',
'warranty_months' => 'integer',
'note' => 'alpha_space',
'notes' => 'alpha_space',
Expand Down

0 comments on commit b97f5fc

Please sign in to comment.