def METHOD_NAME(
    cls,
    validate_func: Callable[[str], bool],
    error_message: str = "Invalid input",
    move_cursor_to_end: bool = False,
) -> Validator:
    """
    Create a validator from a simple validate callable. E.g.:
    .. code:: python
        def is_valid(text):
            return text in ['hello', 'world']
        Validator.from_callable(is_valid, error_message='Invalid input')
    :param validate_func: Callable that takes the input string, and returns
        `True` if the input is valid input.
    :param error_message: Message to be displayed if the input is invalid.
    :param move_cursor_to_end: Move the cursor to the end of the input, if
        the input is invalid.
    """
    return _ValidatorFromCallable(validate_func, error_message, move_cursor_to_end)