refactor varname in validation directives