mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-06-05 15:07:56 +09:00
19 lines
479 B
PHP
19 lines
479 B
PHP
<form method="POST" action="{{ route('products.store') }}">
|
|
@csrf
|
|
Name:
|
|
<br />
|
|
<input type="text" name="name" />
|
|
<br />
|
|
{{-- TASK: show the validation error for the specific "name" field --}}
|
|
{{-- using one Blade directive: pseudo-code below --}}
|
|
{{-- @directive --}}
|
|
{{-- {{ $message }} --}}
|
|
{{-- @endDirective --}}
|
|
@error('name')
|
|
{{ $message }}
|
|
@enderror
|
|
|
|
<br /><br />
|
|
<button type="submit">Save</button>
|
|
</form>
|