Separate validation logic to model and a view method

Move validation logic to the model
and make the view's reaction a separate method.