I'm having issues setting up validation on the dataSource's schema.model.fields object. I am following the documentation at: http://www.kendoui.com/documentation/framework/datasource/configuration.aspx as a guide. It seems that the validation never fires.
Below is the data source's schema property:
model: {
id: "ID",
fields: {
Name: {
editable: true,
nullable: true,
validation : {
required:true,
customRule: function(input){alert('bad data');}
}
}
}
I would expect that this would mark the field as required, and prevent the form from submitting and then also pop up an alert.
I have created a jsfiddle with some sample code at:
http://jsfiddle.net/sholder/RxLWS/
any guidance on what I have wrong would be most appreciated.
Thanks,
Shane Holder
Below is the data source's schema property:
model: {
id: "ID",
fields: {
Name: {
editable: true,
nullable: true,
validation : {
required:true,
customRule: function(input){alert('bad data');}
}
}
}
I would expect that this would mark the field as required, and prevent the form from submitting and then also pop up an alert.
I have created a jsfiddle with some sample code at:
http://jsfiddle.net/sholder/RxLWS/
any guidance on what I have wrong would be most appreciated.
Thanks,
Shane Holder