beginning to add validations
added validations and displays error messages successfully, all working on browser