validator and listener