ASPxClientEdit.ValidateGroup(validationGroup) Method
Performs validation of editors contained within the specified validation group, dependent on the editor visibility state specified.
Declaration
static ValidateGroup(
validationGroup: string,
validateInvisibleEditors?: boolean
): boolean
Parameters
Name | Type | Description |
---|---|---|
validationGroup | string | A string value specifying the validation group’s name. |
validateInvisibleEditors | boolean |
|
Returns
Type | Description |
---|---|
boolean |
|
Remarks
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