validators refactoring