Validations

Added some validations for create and update.