Save query dialog validation