> For the complete documentation index, see [llms.txt](https://destplay.gitbook.io/plugin-components/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://destplay.gitbook.io/plugin-components/extra-functions/validate.md).

# Validate

Создает валидацию для текстовых полей

The **.SetValidate()** method is used to connect validation to the component. As an argument, you must specify a reference to the validation method with the call:

`PluginComponents.Validate.Any()`

It looks like this in the end:

`local InputExapmle = PluginComponents.Component.Input.New()`

`.SetValidate(PluginComponents.Validate.Any())`

## Types

### Any()

This is an empty method. It holds any values.

### .Number(min:number, max:number, def:number)

Allows any number to be used. Between min to max

### .NoEmpty(def:string)

Does not allow the field to be left blank. Outputs def if after empty.

### .Int(min:number, max:number, def:number)

Allows only whole numbers to be used. Between min to max
