teiiddes-2245: Refined logic for password check during preview.