validation error message in laravel
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
validation error message in laravel
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
laravel select validation error messages
<div class="form-group">
<select id="province" name="province" class="form-control @error('province') is-invalid @enderror" >
<option>Choose...</option>
<option value="Western Cape" {{ ($user->learner->province == "Western Cape") ? 'selected' : ''}}>Western Cape</option>
<option value="Northern Cape" {{ ($user->learner->province == "Northern Cape") ? 'selected' : '' }}>Northern Cape</option>
<option value="Eastern Cape" {{ ($user->learner->province == "Eastern Cape") ? 'selected' : '' }}>Eastern Cape</option>
<option value="North West" {{ ($user->learner->province == "North West") ? 'selected' : '' }}>North West</option>
<option value="Free State" {{ ($user->learner->province == "Free State") ? 'selected' : '' }}> Free State</option>
<option value="Kwazulu Natal" {{ ($user->learner->province == "Kwazulu Natal") ? 'selected' : '' }}>Kwazulu Natal</option>
<option value="Gauteng" {{ ($user->learner->province == "Gauteng") ? 'selected' : '' }}>Gauteng</option>
<option value="Limpopo" {{ ($user->learner->province == "Limpopo") ? 'selected' : '' }}>Limpopo</option>
<option value="Mpumalanga" {{ ($user->learner->province == "Mpumalanga") ? 'selected' : '' }}>Mpumalanga</option>
</select>
@error('province')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us