Moved logic for checking required fields into odm.