corrected switch validation rules