Add the validation error fields in the templates

This commit is contained in:
Nabeel Shahzad
2018-02-06 10:18:22 -06:00
parent 995d53df3e
commit 8d76e16220
12 changed files with 77 additions and 10 deletions

View File

@@ -8,11 +8,13 @@
{!! Form::text('icao', null, [
'id' => 'airport_icao', 'class' => 'form-control'
]) !!}
<p class="text-danger">{{ $errors->first('icao') }}</p>
</div>
<div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}&nbsp;<span class="required">*</span>
{!! Form::text('name', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
</div>
@@ -20,11 +22,13 @@
<div class="form-group col-sm-6">
{!! Form::label('lat', 'Latitude:') !!}&nbsp;<span class="required">*</span>
{!! Form::number('lat', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lat']) !!}
<p class="text-danger">{{ $errors->first('lat') }}</p>
</div>
<div class="form-group col-sm-6">
{!! Form::label('lon', 'Longitude:') !!}&nbsp;<span class="required">*</span>
{!! Form::number('lon', null, ['class' => 'form-control', 'step' => '0.000001', 'rv-value' => 'airport.lon']) !!}
<p class="text-danger">{{ $errors->first('lon') }}</p>
</div>
</div>
@@ -32,11 +36,13 @@
<div class="form-group col-sm-6">
{!! Form::label('iata', 'IATA:') !!}
{!! Form::text('iata', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('iata') }}</p>
</div>
<div class="form-group col-sm-6">
{!! Form::label('location', 'Location:') !!}
{!! Form::text('location', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('location') }}</p>
</div>
</div>
@@ -44,11 +50,13 @@
<div class="form-group col-sm-6">
{!! Form::label('country', 'Country:') !!}
{!! Form::text('country', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('country') }}</p>
</div>
<div class="form-group col-sm-6">
{!! Form::label('tz', 'Timezone:') !!}
{!! Form::select('tz', $timezones, null, ['class' => 'select2']); !!}
<p class="text-danger">{{ $errors->first('tz') }}</p>
</div>
</div>