Displaying errors on Laravel forms
We're using Bootstrap 3 with Laravel to create more user friendly error messages by adding the "form-error" class to each input failing validation.
{{ Form::email("email", array("class"=>"form-control " . ($errors->first('email') ? 'form-error' : ''),"placeholder"=>"luke.skywalker@jedi.ninja")) }}
Then styling the input with a red border
.form-error {
border: 1px solid #e74c3c
}
Written by Codesion UK
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#