Hi Bharat,
Thanks for contacting the Syncfusion support.
Using the custom validation in jQuery, we can set the customized validation condition for Textbox. Please refer to the below code example to know how can we add the custom validation for Textbox. Using the addMethod, we can add custom validation in jQuery validator.
$("#Grid").ejGrid({
columns: [
{ field: "CustomerID", headerText: 'Customer ID', width: 90, validationRules: { customRegex: " "} }, // Custom validation
]
});
$.validator.addMethod("customRegex", function (value, element, params) {
if (element.value.indexOf(params) == 0)
return false;
return true;
}, "Contains the white sapce");
|
Please share the following details,
1. Do you want to check your validation condition before save action?
2. Want to display the validation message?
We have created a sample in jsplayground: Sample
Regards,
Isuriya R