Do validation in the model instead of controller

Validation has nothing to do with interface logic so it should be in the model.
Added as well a Validator class in utils.js