How do you validate a column in a RowEditDialog. I am using the following:
{ columnKey: "uc", editorType: "text", required: true, validatorOptions: { onblur: function (evt, ui) { alert("why...always...why"); } } }
Under Updating -> ColumnSettings.
Nothing seems to work.
Hello William,
Please note that onBlur is a Boolean option and you can set it either true or false. Also within the grid widget, validatorOptions is accessible through editorOptions object. You can set custom error message using for example something similar to the following code:
columnSettings: [ { columnKey: "first_name", editorType: "text", editorOptions: { validatorOptions: { required: { errorMessage: "Custom required" } } } }]
Thanks for your reply. What I was want to do is call as custom validation method onblur and show a custom messaage if it fails while keeping focus. How do I do that? Also I assume onblur (true) means validate onblur, is that correct? Is there a list of these options?