Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
Validating RowEditDialog
posted

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. 

Parents
  • 15320
    Offline posted

    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"
    									}
    								}
    							}
    						}]

Reply Children