jQuery Mobile h5Validate help

泪湿孤枕 提交于 2019-12-12 05:28:52

问题


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;
}

回答1:


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.



来源:https://stackoverflow.com/questions/7234336/jquery-mobile-h5validate-help

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!