more refactoring of the validator plugin