---
title: "InputTextValidator | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/InputTextValidator/"
---

# InputTextValidator

> - [`MultiSelectMode`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Commands.md#multiselectmode)

## Classes

### InputTextValidator

#### Implements

#### Constructors

##### Constructor

```ts
new InputTextValidator(userConfirmationDelegate?): InputTextValidator;
```

###### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `userConfirmationDelegate` | `Func`\<[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`boolean`\>, `string`\> | `null` |

###### Returns

[`InputTextValidator`](#inputtextvalidator)

#### Accessors

##### userConfirmationDelegate

###### Get Signature

```ts
get userConfirmationDelegate(): Func<Promise<boolean>, string>;
```

###### Returns

`Func`\<[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`boolean`\>, `string`\>

###### Set Signature

```ts
set userConfirmationDelegate(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `Func`\<[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`boolean`\>, `string`\> |

###### Returns

`void`

#### Methods

##### validate()

```ts
validate(text): boolean;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `text` | `string` |

###### Returns

`boolean`

##### validateWithConfirmation()

```ts
validateWithConfirmation(text): Promise<IInputTextValidatorResult>;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `text` | `string` |

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`IInputTextValidatorResult`\>
