gui text validation and formatting