Move logic to controller
Highlight match text
Show message for empty text