Cleanup code.
Implement regexp validator for TextWidget.