more sensible pattern for doing validaiton in controller