validation and relation in mongodb