Skip to content

Commit

Permalink
Remove unique validation rule on allergen, category, location, mealti…
Browse files Browse the repository at this point in the history
…me, menu and table requests

Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Jun 5, 2022
1 parent 721943a commit 20a9e62
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/admin/requests/Allergen.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function attributes()
public function rules()
{
return [
'name' => ['required', 'between:2,128', 'unique:allergens'],
'name' => ['required', 'between:2,128'],
'description' => ['min:2'],
'status' => ['boolean'],
];
Expand Down
2 changes: 1 addition & 1 deletion app/admin/requests/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function attributes()
public function rules()
{
return [
'name' => ['required', 'between:2,128', 'unique:categories'],
'name' => ['required', 'between:2,128'],
'description' => ['min:2'],
'permalink_slug' => ['alpha_dash', 'max:255'],
'parent_id' => ['nullable', 'integer'],
Expand Down
2 changes: 1 addition & 1 deletion app/admin/requests/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function attributes()
public function rules()
{
return [
'location_name' => ['required', 'between:2,32', 'unique:locations'],
'location_name' => ['required', 'between:2,32'],
'location_email' => ['required', 'email:filter', 'max:96'],
'location_telephone' => ['sometimes'],
'location_address_1' => ['required', 'between:2,128'],
Expand Down
2 changes: 1 addition & 1 deletion app/admin/requests/Mealtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function attributes()
public function rules()
{
return [
'mealtime_name' => ['required', 'between:2,128', 'unique:mealtimes'],
'mealtime_name' => ['required', 'between:2,128'],
'start_time' => ['required', 'valid_time'],
'end_time' => ['required', 'valid_time'],
'mealtime_status' => ['required', 'boolean'],
Expand Down
2 changes: 1 addition & 1 deletion app/admin/requests/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function attributes()
public function rules()
{
return [
'menu_name' => ['required', 'between:2,255', 'unique:menus'],
'menu_name' => ['required', 'between:2,255'],
'menu_description' => ['between:2,1028'],
'menu_price' => ['required', 'numeric', 'min:0'],
'categories.*' => ['sometimes', 'required', 'integer'],
Expand Down
2 changes: 1 addition & 1 deletion app/admin/requests/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function attributes()
public function rules()
{
return [
'table_name' => ['required', 'min:2', 'max:255', 'unique:tables'],
'table_name' => ['required', 'min:2', 'max:255'],
'min_capacity' => ['required', 'integer', 'min:1', 'lte:max_capacity'],
'max_capacity' => ['required', 'integer', 'min:1', 'gte:min_capacity'],
'extra_capacity' => ['required', 'integer'],
Expand Down

0 comments on commit 20a9e62

Please sign in to comment.