def METHOD_NAME():
    if self.limit_content_to:
        org_length = len(self.text_field.text)
        self.text_field.text = ''.join([e for e in self.text_field.text if e in self.limit_content_to])
        self.text_field.cursor.x -= org_length - len(self.text_field.text)
        self.text_field.cursor.x = max(0, self.text_field.cursor.x)
    if self.hide_content:
        replacement_char = '*'
        if isinstance(self.hide_content, str):
            replacement_char = self.hide_content
        self.text_field.text_entity.text = replacement_char * len(self.text_field.text)
        return
    if self.on_value_changed and not self.text_field.text_entity.text == self.text_field.text:
        self.on_value_changed()
    self.text_field.text_entity.text = self.text_field.text