I have started to develop using jQuery mobile and for validation on the android because of lack of html5 support, thought I would try h5Validate. Now try as I might, I cannot get this to work. I have posted my inputs and if someone could just show me a mark-up for this I would be grateful. Thanks
h5Validate link:
http://ericleads.com/h5validate/?name=
html
<div data-role="fieldcontain">
<label for="slider">No of Boxes *</label>
<input type="range" name="slider" id="slider" data-h5-errorid="boxnumber" title="Required: Please enter your box(es)." required data-track-theme="a" value="0" min=开发者_开发百科"0" max="10" required />
</div>
<div id="boxnumber" class="ui-state-error message" style="display:none;" data-theme="b">
script
<script>
$(document).ready(function () {
$('#login').h5Validate({
errorClass:'black'
});
});
</script>
css
.ui-state-error {
background-color:#BB1100;
color:white;
}
#login input, label {
float:left;
}
.message {
margin-left:1em;
width:20em;
border:1px;
padding:2px;
float:left;
font-size:10pt;
}
.black {
background-color:#111111;
color:silver;
}
The new input types were being ignored by h5Validate. I've fixed that. If you still have trouble, let me know. You can file bug tickets here: https://github.com/dilvie/h5Validate/issues?sort=created&direction=desc&state=open
Try upgrading to the latest h5Validate.
精彩评论