samples for input validation fixed to work in all templates