It would be cool to get all fields, including the mandatory ones validated this way. This function would end up a lot simpler (I think), and we would eliminate code duplication.