I had a similar issue. In SharePoint 2013 (in a Visual Web Part at least) adding a form directly in the markup causes grief. SP will 'formify' it by adding a huge blob of generated markup and change the look and feel. While there is likely a way to remedy that issue, I wanted to quickly add Parsley to a table with many inputs without toying with the SP-generated form. My solution was to use jQuery $.wrap() after the UI was rendered. Works like a charm. Yes, it still uses a form element, but maybe you were avoiding a form for similar reasons.
Try this JSFiddle
<div id='container'>
<button type="button" id="save">Save</button>
<table>
<tr>
<td><input type='number' min='0' max='999' /></td>
... many more inputs
</tr>
...
</table>
</div>
<script ... >
$(document).ready(function(){
$("#container").wrap("<form id='fooForm'></form>");
var options = {
uiEnabled: true,
errorsWrapper: '',
excluded: '.inActive'
};
// create the validator
$("#fooForm").parsley(options);
// wire up click event for the save button
$("#save").click(function () {
// react to form valid state
// calling parsley again only returns the
// ref to the original, does not duplicate
var validator = $("#fooForm").parsley();
validator.validate();
// handle validator.isValid();
// ajax form post or other
});
});
</script>
parsley-bind
in the documentation. – Zenithal