Hello goooseman,
It is possible to achieve this. Here is an example:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../../jqwidgets/styles/jqx.summer.css" type="text/css" />
<script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxvalidator.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var customRule = function (input, commit) {
if (input.val() == "") {
return false;
} else {
return true;
}
};
$('#testForm').jqxValidator({ rules: [
{ input: '#userInput', message: 'Field is required', action: 'keyup, blur', rule: customRule },
{ input: '#emailInput', message: 'Field is required', action: 'keyup, blur', rule: customRule }
]
});
});
</script>
</head>
<body>
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>
Username:
</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>
E-mail:
</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
</body>
</html>
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/