allow validator to be the name of a function or a value