Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.8] Update auth stubs with @error blade directive #28273

Merged
merged 1 commit into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>

<div class="col-md-6">
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>

@if ($errors->has('email'))
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>

<div class="col-md-6">
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required autocomplete="current-password">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">

@if ($errors->has('password'))
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('password') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>

<div class="col-md-6">
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>

@if ($errors->has('email'))
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>

<div class="col-md-6">
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>

@if ($errors->has('email'))
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>

<div class="col-md-6">
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required autocomplete="new-password">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">

@if ($errors->has('password'))
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('password') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

Expand Down
24 changes: 12 additions & 12 deletions src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label>

<div class="col-md-6">
<input id="name" type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>

@if ($errors->has('name'))
@error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('name') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>

<div class="col-md-6">
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autocomplete="email">
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">

@if ($errors->has('email'))
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>

<div class="col-md-6">
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required autocomplete="new-password">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">

@if ($errors->has('password'))
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('password') }}</strong>
<strong>{{ $message }}</strong>
</span>
@endif
@enderror
</div>
</div>

Expand Down