# CustomValidator

Adds support for \[System.Web.UI.WebControls.CustomValidator] [<mark style="color:orange;">https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.customvalidator?view=netframework-4.8</mark>](https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.customvalidator?view=netframework-4.8)

Allows to perform a validation over control from a validation defined by the user.

### **Implementation Details:**

**Component Selector:** ‘wm-custom-validator’

**Kendo UI Component:** <mark style="color:orange;">N/A</mark>

## **Class inheritance**

CustomValidatorComponent extends [<mark style="color:orange;">BaseValidatorComponent</mark>](/webmap/general/frontend/documentation/webforms-angular-components/web-components/base-components/basevalidator-component.md)

## **PME Support**

### **Properties**

| **Property**                    | **Get/Set** | **Details**                                                                                                                      |
| ------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
| ControlToValidate: string       | Yes         | ID of control to validate                                                                                                        |
| clientValidationFunction:string | Yes         | Custom client validation function.                                                                                               |
| ErrorMessage:string             | Yes         | Message showed in validator if result of custom setup function is false and text property is empty                               |
| Text:string                     | Yes         | Message showed in validator if result of comparation is not true                                                                 |
| Display:ValidatorDisplay        | Yes         | Enum property with options Static, None, Dynamic                                                                                 |
| ValidationGroup:string          | Yes         | If is established the name of the validationgroup component only will validate controls with the same validationgroup associated |
| Hidden:boolean                  | Yes         | Establishes if the validator shows or is hides                                                                                   |

### &#x20;**Methods**

| **Methods**     | **Details**                                                                          |
| --------------- | ------------------------------------------------------------------------------------ |
| validateControl | Return a Boolean value based in the result of custom function assigned.              |
| displayMesssage | Shows value of text property or ErrorMessage property in case text property is empty |

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gapvelocity.ai/webmap/general/frontend/documentation/webforms-angular-components/web-components/kendoui-components/customvalidator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
