Skip to content

Commit

Permalink
Revomes id field from request and corrects validation error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
betsyecastro committed Apr 24, 2024
1 parent 164852e commit 98e1fc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions app/Http/Requests/TagUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function rules()

return [
'type' => 'required',
'id' => 'required|gt:0',
'name' => [
'required',
'string',
Expand All @@ -43,9 +42,9 @@ public function rules()
public function messages()
{
return [
'name.required' => 'You must provide a tag name',
'name.required' => 'The tag name is required.',
'name.unique' => 'The tag name provided already exists.',
'name.max' => 'Tag name is too long.',
'name.max' => 'The tag name provided exceeds maximum length of 100 characters.',
];
}

Expand Down
3 changes: 0 additions & 3 deletions resources/views/tags/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
<span class="text-danger">{!! $errors->first('type') !!}</span>
{!! Form::text('type', null, ['class' => 'form-control', 'readonly']) !!}
</div>
<div class="col-sm-9">
{!! Form::hidden('id', null) !!}
</div>
</div>

<!-- Submit Button -->
Expand Down

0 comments on commit 98e1fc7

Please sign in to comment.