adding validation to env dialog