Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146065 | Jul 18,2019 01:27 PM UTC | Jul 22,2019 01:25 PM UTC | jQuery | 1 |
![]() |
Tags: ejDropDownList |
$('#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")); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.