コード例 #1
0
 def email_assistance(self):
     """Show help for the email field."""
     text = compat.text_type(self.ui.email_edit.text())
     if not is_correct_email(text):
         self.set_error_message(self.ui.email_assistance, INVALID_EMAIL)
         common.check_as_invalid(self.ui.email_edit)
     else:
         self.ui.email_assistance.setVisible(False)
         common.check_as_valid(self.ui.email_edit)
コード例 #2
0
 def name_assistance(self):
     """Show help for the name field."""
     text = compat.text_type(self.ui.name_edit.text())
     if not text.strip():
         self.set_error_message(self.ui.name_assistance, EMPTY_NAME)
         common.check_as_invalid(self.ui.name_edit)
     else:
         self.ui.name_assistance.setVisible(False)
         common.check_as_valid(self.ui.name_edit)
コード例 #3
0
 def email_assistance(self):
     """Show help for the email field."""
     text = compat.text_type(self.ui.email_edit.text())
     if not is_correct_email(text):
         self.set_error_message(self.ui.email_assistance, INVALID_EMAIL)
         common.check_as_invalid(self.ui.email_edit)
     else:
         self.ui.email_assistance.setVisible(False)
         common.check_as_valid(self.ui.email_edit)
コード例 #4
0
 def name_assistance(self):
     """Show help for the name field."""
     text = compat.text_type(self.ui.name_edit.text())
     if not text.strip():
         self.set_error_message(self.ui.name_assistance, EMPTY_NAME)
         common.check_as_invalid(self.ui.name_edit)
     else:
         self.ui.name_assistance.setVisible(False)
         common.check_as_valid(self.ui.name_edit)
コード例 #5
0
 def confirm_email_assistance(self):
     """Show help for the confirm email field."""
     text1 = compat.text_type(self.ui.email_edit.text())
     text2 = compat.text_type(self.ui.confirm_email_edit.text())
     if text1 != text2:
         self.set_error_message(self.ui.confirm_email_assistance, EMAIL_MATCH)
         common.check_as_invalid(self.ui.confirm_email_edit)
     else:
         self.ui.confirm_email_assistance.setVisible(False)
         common.check_as_valid(self.ui.confirm_email_edit)
コード例 #6
0
 def confirm_email_assistance(self):
     """Show help for the confirm email field."""
     text1 = compat.text_type(self.ui.email_edit.text())
     text2 = compat.text_type(self.ui.confirm_email_edit.text())
     if text1 != text2:
         self.set_error_message(self.ui.confirm_email_assistance,
                                EMAIL_MATCH)
         common.check_as_invalid(self.ui.confirm_email_edit)
     else:
         self.ui.confirm_email_assistance.setVisible(False)
         common.check_as_valid(self.ui.confirm_email_edit)