Files
Test-Laravel-Validation/resources/views/projects/create.blade.php
T
2025-04-21 13:06:16 +09:00

31 lines
811 B
PHP

{{-- Form without any design --}}
{{-- TASK: add the validation errors here - with whatever HTML structure you want --}}
{{-- 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:
<br />
<input type="text" name="title" />
<br /><br />
Description:
<br />
<input type="text" name="description" />
<br /><br />
<button type="submit">Save</button>
</form>