# Sandbox.UI.TextEntry.CharacterRegex

```csharp
string CharacterRegex { get; set; }
```

If set, will block the input of any character that doesn't match. 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`.
