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

# LimitsInputValidator

> [`LimitsInputValidator`](#limitsinputvalidator)

## Classes

### LimitsInputValidator

#### Constructors

##### Constructor

```ts
new LimitsInputValidator(currentTextInfo): LimitsInputValidator;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `currentTextInfo` | [`ICurrentTextInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICurrentTextInfo.md#icurrenttextinfo) |

###### Returns

#### Methods

##### setLimits()

```ts
setLimits(limits): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `limits` | [`ITextLimits`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextLimits.md#itextlimits) |

###### Returns

`void`

##### validateInput()

```ts
validateInput(keyboardCommand): LimitsValidationResult;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `keyboardCommand` | [`IKeyboardInputCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IKeyboardInputCommand.md#ikeyboardinputcommand) |

###### Returns

[`LimitsValidationResult`](#limitsvalidationresult)

##### validatePastedText()

```ts
validatePastedText(text): LimitsValidationResult;
```

###### Parameters

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

###### Returns

[`LimitsValidationResult`](#limitsvalidationresult)

***

### LimitsValidationResult

#### Constructors

##### Constructor

```ts
new LimitsValidationResult(limitsViolated, pastedLimitsViolated): LimitsValidationResult;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `limitsViolated` | `boolean` |
| `pastedLimitsViolated` | `boolean` |

###### Returns

[`LimitsValidationResult`](#limitsvalidationresult)

#### Properties

##### limitsViolated

```ts
limitsViolated: boolean;
```

##### pastedLimitsViolated

```ts
pastedLimitsViolated: boolean;
```

#### Accessors

##### isViolated

###### Get Signature

```ts
get isViolated(): boolean;
```

###### Returns

`boolean`
