Hi All,
I am trying to build a web application using JQWidget API. I have a grid populated with data. User can update the data and save it. In this grid, i want to restrict the number of characters, user can enter in a perticular cell. For example, I have a column named “User Id”, In this column user should not be allowed to enter more than 8 characters.
One solution will be to use column Validation callback method and check the length of the string and throw error message if more than 8. i.e.
validation: function (cell, value) {
if(typeof value == ‘undefined’ && value.length > 8){ return { result: false, message: “Not more than 8 characters allowed for User Id” };
}
}
Is there any better solution for this, without writing validation call back method?
Any pointers on this would be of great help!!
Thanks & Regards,
Vishwa