Generic user input validation lib/service