Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed May 5, 2024
1 parent eacdf22 commit 6cd06c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Fields/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public function fields(Request $request): array

Number::make(__('Quantity'), 'quantity')
->required()
->default(1)
->rules(['required', 'numeric', 'gt:0'])
->min(0),
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Item extends Model implements Contract
protected $attributes = [
'price' => 0,
'properties' => '[]',
'quantity' => 0,
'quantity' => 1,
'tax' => 0,
];

Expand Down

0 comments on commit 6cd06c4

Please sign in to comment.