# Sandbox.UI.TextEntry.MaxLength

```csharp
System.Nullable<int> MaxLength { get; set; }
```

If set, visually signals when the input text is longer than this value. Will also set [Sandbox.UI.TextEntry.HasValidationErrors](/api/Sandbox.UI.TextEntry/HasValidationErrors) accordingly.

Declared in [Sandbox.UI.TextEntry](/api/Sandbox.UI.TextEntry).
Assembly: `Sandbox.Engine`.
