More refactoring for the validation directives.