Validation
The ASPxEditors Suite allows you to validate data on both the client and server sides. You can implement different validation scenarios without using additional validation controls.
You can force editor validation in different ways (see the image below).
Validation on Leave. When the ValidationSettings.ValidateOnLeave property is set to true
(the default value), editor value changes trigger validation.
Validation Methods. You can call the following methods to force validation.
- On the client side - ASPxClientEdit.Validate, ASPxClientEdit.ValidateEditorsInContainer, ASPxClientEdit.ValidateEditorsInContainerById, and ASPxClientEdit.ValidateGroup.
- On the server side - ASPxEdit.Validate and ASPxEdit.ValidateEditorsInContainer.
Other Editors. Certain editors can force editor validation if their CausesValidation property is set to true
.
If ASPxButton’s ASPxButton.CausesValidation property is set to
true
(the default value), then the button click forces editor validation. You can use the button’s properties for the following validation cases:- Validate editors in a group (ASPxButton.ValidationGroup).
- Validate editors in a container (ASPxButton.ValidationContainerID).
- Validate both visible and invisible editors (ASPxButton.ValidateInvisibleEditors).
The editor validates the entire group (ValidationSettings.ValidationGroup) if the ValidationSettings.CausesValidation and ASPxEdit.AutoPostBack property values are
true
.