I am having trouble with the ie9 required attribute. The attribute does work on ie10 and above but I will also want to get it worked at ie9.
I have tried this:
$('#submit-button').click(function(){
if($('#message').val() == ''){
alert('Input can not be left blank');
}
});
This function should run when you click the submit-button(check on id) and then he will search for the id message and looks if it is empthy or not.
But this does unfortunately not work for me in ie9. Is there another solution that can solve this porblem?
Solved it, here is the answer (I'm using laravel)
@if($errors->any())
<br>
<div class="alert alert-danger">
@foreach($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
Now all the errors will be listed, so if one or more input(s) are empty the alert will show it.