BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
$('#dropdown1').ejDropDownList({
dataSource: items,
fields: { text: "name", value: "id" },
validationRules: { required: true },
change: function (args) {
var length;
if (args.value === "1") length = 5;
else if (args.value === "2") length = 10;
else if (args.value === "3") length = 15;
maskInstance.option('validationRules.value', length);
}
}); |
$.validator.addMethod("value",
function (value, element, params) {
if (!/Invalid|NaN/.test(value)) {
return parseInt(value.length) == params;
}
}, jQuery.validator.format("cannot insert more than or less than {0} characters")); |