At 2014/3/24, I find the example of official document (Parsley.js) was updated.
So, I download the Parsley again from the GitHub, and edit my code according the example:
http://parsleyjs.org/doc/examples/simple.html
Like:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<script src="jquery-1.11.0.min.js"></script>
<script src="parsley.js"></script>
<script>
function checkMyForm(myform) {
if($(myform).parsley().validate()) {
console.info('Y');
} else {
console.error('N');
}
}
</script>
</head>
<body>
<form name="myform" id="myform" data-parsley-validate>
<!-- <p>
<input name="myradio" type="radio" value="1" data-parsley-required="true"/> Value-1
<input name="myradio" type="radio" value="2"/> Value-2
</p> -->
<div>
<input name="mybox" type="checkbox" value="1" data-parsley-required="true" data-parsley-mincheck="2"/> Value-1
<input name="mybox" type="checkbox" value="2"/> Value-2
<input name="mybox" type="checkbox" value="3"/> Value-3
<input name="mybox" type="checkbox" value="4"/> Value-4
<input name="mybox" type="checkbox" value="5"/> Value-5
</div>
<a href="javascript: checkMyForm(document.myform);">Test Checkbox</a>
<!-- <div style="background-color: gray; width:200px;" onclick="checkMyForm();">Test</div> -->
</form>
</body>
</html>
Though I dose not know the difference not yet. But it is working now.
So, I think it is time to update parsley from 1.2.3 to 2.0.0 rc4.