def _isTextValid(self, text): _, error = validateContactNote(text) return error is None
def _validateNoteText(note): return xmpp_string_utils.validateContactNote(note)[1]