class_docstr: Validate input from a simple callable.
class_docstr_tok: ["Validate","input","from","a","simple","callable","."]
code: def __init__(
      self,
      func: Callable[[str], bool],
      error_message: str,
      move_cursor_to_end: bool,
  ) -> None:
      self.func = func
      self.error_message = error_message
      self.move_cursor_to_end = move_cursor_to_end
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import Callable
  from prompt_toolkit.eventloop import run_in_executor_with_context
  from .document import Document
  from .filters import FilterOrBool, to_filter
label_desc: Use image node_id 1 to create a new _ValidatorFromCallable object from inherited base classes: Validator with example: obj = _ValidatorFromCallable(func, error_message, move_cursor_to_end)