Tag Archives: form validation

Forms? Keep the validation rules inside the model

Created at: February 14, 2014; Last update: May 15, 2014

As always, when talking about forms we also talk about validation. For a long time I’ve validated the forms inside the controllers because it is fast and simple – no more browsing between files.

But after a while you find yourself having a controller which is becoming more complex and bigger. So why not keep at least the validation rules somewhere else? Continue reading