Perspective: Limit text input field to regex pattern?

I don’t know of anything built-in, but you could turn off defer updates and use a property change script similar to here (Limit Characters in a Textbox when Typing).