Input Required Doesn't work on Safari on iPad 3

493 Views Asked by At

I have an email input

<div class="mb10">
    <label class="control-label">Email</label>
    <input id="email" type="email" class="form-control" placeholder='Email' name="email" required >
</div>

It worked on most of the broswer except on Safari on iPad 3.

Is it because of the HTML5 ? Should I use JS in stead ?

$("[name='email']").required = true;

How do I solve this issue ?

1

There are 1 best solutions below

0
Tom Anderson On BEST ANSWER


You are correct in saying that the iPad 3 doesn't support HTML 5. JavaScript is best to stick with for form control because there are still some browsers or they're that don't support form control. Also, using JavaScript, you can make yourself custom messages and actions if something hasn't been completed. Take a look at this link for more info on what does and doesn't work: http://mobilehtml5.org/