Skip to content

Commit da3b9eb

Browse files
Merge pull request #68 from dakira/error-directive
use new error blade directive
2 parents a0f437f + dd4abee commit da3b9eb

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

src/tailwindcss-stubs/resources/views/auth/login.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@
1818
{{ __('E-Mail Address') }}:
1919
</label>
2020

21-
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('email') ? ' border-red-500' : '' }}" name="email" value="{{ old('email') }}" required autofocus>
21+
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('email') border-red-500 @enderror" name="email" value="{{ old('email') }}" required autofocus>
2222

23-
@if ($errors->has('email'))
23+
@error('email')
2424
<p class="text-red-500 text-xs italic mt-4">
25-
{{ $errors->first('email') }}
25+
{{ $message }}
2626
</p>
27-
@endif
27+
@enderror
2828
</div>
2929

3030
<div class="flex flex-wrap mb-6">
3131
<label for="password" class="block text-gray-700 text-sm font-bold mb-2">
3232
{{ __('Password') }}:
3333
</label>
3434

35-
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('password') ? ' border-red-500' : '' }}" name="password" required>
35+
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('password') border-red-500 @enderror" name="password" required>
3636

37-
@if ($errors->has('password'))
37+
@error('password')
3838
<p class="text-red-500 text-xs italic mt-4">
39-
{{ $errors->first('password') }}
39+
{{ $message }}
4040
</p>
41-
@endif
41+
@enderror
4242
</div>
4343

4444
<div class="flex mb-6">

src/tailwindcss-stubs/resources/views/auth/passwords/email.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
{{ __('E-Mail Address') }}:
2626
</label>
2727

28-
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-grey-darker leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('email') ? ' border-red' : '' }}" name="email" value="{{ old('email') }}" required>
28+
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-grey-darker leading-tight focus:outline-none focus:shadow-outline @error('email') border-red @enderror" name="email" value="{{ old('email') }}" required>
2929

30-
@if ($errors->has('email'))
30+
@error('email')
3131
<p class="text-red-500 text-xs italic mt-4">
32-
{{ $errors->first('email') }}
32+
{{ $message }}
3333
</p>
34-
@endif
34+
@enderror
3535
</div>
3636

3737
<div class="flex flex-wrap">

src/tailwindcss-stubs/resources/views/auth/passwords/reset.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@
2020
{{ __('E-Mail Address') }}:
2121
</label>
2222

23-
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('email') ? ' border-red' : '' }}" name="email" value="{{ old('email') }}" required autofocus>
23+
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('email') border-red @enderror" name="email" value="{{ old('email') }}" required autofocus>
2424

25-
@if ($errors->has('email'))
25+
@error('email')
2626
<p class="text-red-500 text-xs italic mt-4">
27-
{{ $errors->first('email') }}
27+
{{ $message }}
2828
</p>
29-
@endif
29+
@enderror
3030
</div>
3131

3232
<div class="flex flex-wrap mb-6">
3333
<label for="password" class="block text-gray-700 text-sm font-bold mb-2">
3434
{{ __('Password') }}:
3535
</label>
3636

37-
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('password') ? ' border-red' : '' }}" name="password" required>
37+
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('password') border-red @enderror" name="password" required>
3838

39-
@if ($errors->has('password'))
39+
@error('password')
4040
<p class="text-red-500 text-xs italic mt-4">
41-
{{ $errors->first('password') }}
41+
{{ $message }}
4242
</p>
43-
@endif
43+
@enderror
4444
</div>
4545

4646
<div class="flex flex-wrap mb-6">

src/tailwindcss-stubs/resources/views/auth/register.blade.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,41 @@
1818
{{ __('Name') }}:
1919
</label>
2020

21-
<input id="name" type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('name') ? ' border-red-500' : '' }}" name="name" value="{{ old('name') }}" required autofocus>
21+
<input id="name" type="text" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('name') border-red-500 @enderror" name="name" value="{{ old('name') }}" required autofocus>
2222

23-
@if ($errors->has('name'))
23+
@error('name')
2424
<p class="text-red-500 text-xs italic mt-4">
25-
{{ $errors->first('name') }}
25+
{{ $message }}
2626
</p>
27-
@endif
27+
@enderror
2828
</div>
2929

3030
<div class="flex flex-wrap mb-6">
3131
<label for="email" class="block text-gray-700 text-sm font-bold mb-2">
3232
{{ __('E-Mail Address') }}:
3333
</label>
3434

35-
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('email') ? ' border-red-500' : '' }}" name="email" value="{{ old('email') }}" required>
35+
<input id="email" type="email" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('email') border-red-500 @enderror" name="email" value="{{ old('email') }}" required>
3636

37-
@if ($errors->has('email'))
37+
@error('email')
3838
<p class="text-red-500 text-xs italic mt-4">
39-
{{ $errors->first('email') }}
39+
{{ $message }}
4040
</p>
41-
@endif
41+
@enderror
4242
</div>
4343

4444
<div class="flex flex-wrap mb-6">
4545
<label for="password" class="block text-gray-700 text-sm font-bold mb-2">
4646
{{ __('Password') }}:
4747
</label>
4848

49-
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline{{ $errors->has('password') ? ' border-red-500' : '' }}" name="password" required>
49+
<input id="password" type="password" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('password') border-red-500 @enderror" name="password" required>
5050

51-
@if ($errors->has('password'))
51+
@error('password')
5252
<p class="text-red-500 text-xs italic mt-4">
53-
{{ $errors->first('password') }}
53+
{{ $message }}
5454
</p>
55-
@endif
55+
@enderror
5656
</div>
5757

5858
<div class="flex flex-wrap mb-6">

0 commit comments

Comments
 (0)