Hello Syncfusion Support Team,
I have this Syncfusion dropdownlist and a text box which has value of nameLength (using data-bind knockout value binding)
what i need is when the user select "name1" value from dropdownlist , the max length of nameLength should be equal to 5.
otherwise when the user select "name2" value from dropdownlist , the max length of nameLength should be equal to 10.
when the user select "name3" value from dropdownlist , the max length of nameLength should be equal to 15.
so that , if the user select "name1" , and try to enter a value in text box >5 or <5 number of characters(max length ) , a red error message "cannot insert more than or less than 5 characters" will appear under this textbox .
thanks in advanced.
self.nameLength = ko.observable();
var items = [
{ name: "name1", id: "1" },
{ name: "name2", id: "2" },
{ name: "name3", id: "3" }
];
$('#nationality').ejDropDownList({
dataSource: items,
fields: { text: "name", value: "id" },
select: function (args) {
console.log("Value is " + args.value);
},
watermarkText: "names",
width: "100%"
});
name: