how to validate select