added the validations.