Adding validation to select the field