class_docstr: Validator that can be switched on/off according to
  a filter. (This wraps around another validator.)
class_docstr_tok: ["Validator","that","can","be","switched","on\/off","according","to","a","filter",".","(","This","wraps","around","another","validator",".",")"]
code: def __init__(self, validator, filter):
      assert isinstance(validator, Validator)
  
      self.validator = validator
      self.filter = to_simple_filter(filter)
  
file_path: catboost/contrib/python/prompt-toolkit/py2/prompt_toolkit/validation.py
imports: from __future__ import unicode_literals
  from .filters import to_simple_filter
  from abc import ABCMeta, abstractmethod
  from six import with_metaclass
label_desc: Use image node_id 1 to create a new ConditionalValidator object from inherited base classes: Validator with example: obj = ConditionalValidator(validator, filter)