We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the jQuery Validation in the Editor Type control?

The jQuery validate plugin makes simple clientside form validation easy while still offering plenty of customization options. The plugin comes with a useful set of validation methods including URL and email validation, while providing an API to write your own methods to validate the form element.

Use JQuery validation

The jQuery validate plugin rules and custom methods can be used in the editor type control with the help of two properties, the validationRules and the validationMessage. The validationRules property is used to define the jQuery validate rules for the control and validationMessage is used to define the respective error message for the rules that are specified in the validationRules property. When error message is not specified to the validation rules, it takes the default validation error message. The validationRules and validationMessage properties work within a form element, otherwise it does not work. Before using those properties, you need to add the jQuery validate plugin to your application. Syncfusion has provided the following properties to the list of control.

  1. Date Picker.
  2. DateTimePicker.
  3. Numeric, Currency and Percentage textbox.                                               
  4. Mask Edit Textbox.               
  5. Autocomplete and Dropdown.
  6. Checkbox and Radio button.

You can define the validationRules and the validationMessage properties to the control as shown in the following code:

JavaScript

CSHTML

You can also define the validationRules and validationMessage properties to other list of controls.               

A sample jQuery validation is available in the following location: Sample location

Article ID: Published Date: Last Revised Date: Platform: Control:
4322 03/25/2015 03/25/2015 JavaScript General
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon