Fixes validation and entity controller.
Allow for conditions in validation