mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-06-05 15:07:56 +09:00
Complete all tasks
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
{{-- @directive --}}
|
||||
{{-- {{ $message }} --}}
|
||||
{{-- @endDirective --}}
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
|
||||
<br /><br />
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
@@ -4,6 +4,18 @@
|
||||
{{-- in case of title/description empty, visitor should see --}}
|
||||
{{-- "The name field is required." and "The description field is required." --}}
|
||||
|
||||
@if ($errors->any())
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error )
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('projects.store') }}">
|
||||
@csrf
|
||||
Title:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Name:
|
||||
<br />
|
||||
{{-- TASK: change this field so it would contain old value after validation error --}}
|
||||
<input type="text" name="name" />
|
||||
<input type="text" name="name" value={{ old('name') }}/>
|
||||
<br /><br />
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user