self.password_help=HelpButton(_('Password must be at least 6 characters')+'\n\n'+_('It should contain a number, an uppercase alphabet and a special character'))
grid.addWidget(self.new_pw,1,1)
grid.addWidget(self.password_help,1,4)
#add Password Strength Label to grid
grid.addWidget(self.pw_strength,1,2)
grid.addWidget(QLabel(_('Confirm Password')),2,0)
grid.addWidget(self.conf_pw,2,1)
vbox.addLayout(grid)
#Add an event handler to update password strength interactively
#Check for password strength if user chooses to enter a password
#Check the length
iflen(new_password)<6:
QMessageBox.warning(parent,_('Error'),_('Password is too short. It must be at least 6 characters')+'\n\n'+_('Click help beside the password button for more information'),_('OK'))
QMessageBox.warning(parent,_('Error'),_('Password must contain at least one Upper case alphabet')+'\n\n'+_('Click help beside the password button for more information'),_('OK'))
# Retry
returnrun_password_dialog(self,wallet,parent)
#Check for special characters
if(re.match('^[a-zA-Z0-9]*$',new_password)):
QMessageBox.warning(parent,_('Error'),_('Password must contain at least one special character')+'\n\n'+_('Click help beside the password button for more information'),_('OK'))