Skip to content

Commit

Permalink
Create StoreItemRequest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
OhmygoodR authored Sep 14, 2024
1 parent 2f4a178 commit 2a9e9d7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/Http/Requests/StoreItemRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

// TASK: Customize the validation error message to say "Please enter the name"
class StoreItemRequest extends FormRequest
{


/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}

/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => ['required'],
'description'=>['required']
];
}
}

0 comments on commit 2a9e9d7

Please sign in to comment.