Skip to content

Commit

Permalink
Decrease honeytime timeout and improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mzur committed Sep 29, 2022
1 parent 05001f4 commit 91973f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Http/Requests/StoreNewsletterSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function rules()
$rules = [
'email' => 'required|string|email|max:256',
'website' => 'honeypot',
'homepage' => 'honeytime:5|required',
'homepage' => 'honeytime:2|required',
];

if (View::exists('privacy')) {
Expand Down
5 changes: 4 additions & 1 deletion src/resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</p>
</div>
<form class="well clearfix" role="form" method="POST" action="{{ url('newsletter/subscribe') }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<div class="form-group{{ $errors->any(['email', 'homepage']) ? ' has-error' : '' }}">
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-envelope"></i>
Expand All @@ -22,6 +22,9 @@
@if($errors->has('email'))
<span class="help-block">{{ $errors->first('email') }}</span>
@endif
@if($errors->has('homepage'))
<span class="help-block">{{ $errors->first('homepage') }}</span>
@endif
</div>
@if (View::exists('privacy'))
<div class="form-group{{ $errors->has('privacy') ? ' has-error' : '' }}">
Expand Down

0 comments on commit 91973f6

Please sign in to comment.