Skip to content

Commit

Permalink
Update: product size validation and message
Browse files Browse the repository at this point in the history
  • Loading branch information
Soltee committed Mar 3, 2024
1 parent 93e70fa commit 2746388
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Livewire/Admin/Attribute/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ public function saveAttribute()
$this->message = '';

$this->validate([
'size' => 'required|string|min:1|max:3',
'size' => 'required|string|min:1|max:3|in:XS,S,M,L,XL,2XL,3XL',
'price' => 'required|int',
'quantity' => 'required|int',
], [
'size.in' => 'The selected size must be one of these, XS,S,M,L,XL,2XL,3XL'
]);

//Create Attr
Expand Down

0 comments on commit 2746388

Please sign in to comment.