Skip to main content

ASPxClientEdit.Validate Method

Performs the editor’s validation.

Declaration

Validate(): void

Remarks

This method allows you to programmatically perform client-side validation of the editor control.

A call to the Validate generates the ASPxClientEdit.Validation event.

Example

View Example

<strong>2. Validating a single editor via a script:</strong>
<br /><br />
<table>
    <tr>
        <td>
            <input type="button" value="Validate" onclick="ASPxClientControl.GetControlCollection().GetByName('tbTextBox2').Validate();" style="width: 127px;" />
        </td>
        <td>
            <dx:ASPxTextBox ID="tbTextBox2" runat="server" ClientInstanceName="tbTextBox2" Width="170px">
                <ValidationSettings validateonleave="False">
                    <RequiredField IsRequired="True" ErrorText="Field is required." />
                </ValidationSettings>
            </dx:ASPxTextBox>
        </td>
    </tr>
</table>
See Also