Added validation to the views