added validations to view