added validation to events model