"""Includes the Validation and Validator classes."""
import idb.util as util


class Validation(object):
  """A simple validation mechanism, designed for use by idb.data.ModelBase."""
  def __init__(self, callback, property_name=None, message=None, is_simple=True,
               is_property_specific=True):
    """
      is_simple - when True the validation requires no outside information to process, if False,
        outside information (such as a database connection) is required.
      is_property_specific - when True, the value of the property under question is passed to the
        validation callback, when false the entire model is passed.
    """
    self.property_name = property_name
    self.callback = callback