Move matcher validation from controller to model

Also add tests