That's not a bad idea.  But for now I'd like to just keep it simple and return a function.  I added min and max for number value validation.