refactors common logic from decorators and mixins into new verification module
in doing so, applies the improved error message to mixins as well (previous commit only applied it to decorators)