added validation type and event listener to select