validatortype refactoring