aspnet-js-aspxclientedit-dot-validategroup-dot-static-x28-validationgroup-x29.md
Performs validation of editors contained within the specified validation group, dependent on the editor visibility state specified.
static ValidateGroup(
validationGroup: string,
validateInvisibleEditors?: boolean
): boolean
| Name | Type | Description |
|---|---|---|
| validationGroup | string |
A string value specifying the validation group’s name.
| | validateInvisibleEditors | boolean |
true to validate both visible and invisible editors that belong to the specified validation group; false to validate only visible editors.
|
| Type | Description |
|---|---|
| boolean |
true if editors of the specified validation group pass validation; otherwise, false.
|
This method allows you to programmatically perform client-side validation of editors belonging to a specific validation group.
Note
If the validationGroup parameter is set to null , the method validates all/visible (under the validateInvisibleEditor parameter value) editors on a page.
<dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px">
<ValidationSettings ValidationGroup="MyGroup" ValidateOnLeave="False">
<RequiredField IsRequired="True" ErrorText="Field is required" />
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxTextBox ID="ASPxTextBox2" runat="server" Width="170px">
<ValidationSettings ValidationGroup="MyGroup" ValidateOnLeave="False">
<RequiredField IsRequired="True" ErrorText="Field is required" />
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxButton ID="btn" runat="server" Text="Validate" AutoPostBack="False" CausesValidation="False">
<ClientSideEvents Click="function(s, e) {
ASPxClientEdit.ValidateGroup('MyGroup');
}" />
</dx:ASPxButton>
See Also
ValidateEditorsInContainer.static
ValidateEditorsInContainerById.static