Changelog
=========

0.6.1 (2012-12-10)
------------------

- Added support for the field definition callable to raise a
  ``KeyError`` exception such that the input is ignored.

0.6 (2012-12-10)
----------------

- The ``marshalling`` module has been renamed to ``parser``.

- Fixed issue where an integer would cause an error even when not
  required.

0.5.4 (2012-12-04)
------------------

- Added ``keys`` method to marshaller such that the object can be used
  as a mapping.

0.5.3 (2012-11-23)
------------------

- Fixed an issue where a fields definition with a single entry would
  get incorrectly marshalled when the corresponding data had multiple
  entries.

0.5.2 (2012-11-19)
------------------

- Fixed an issue with `required` where the marshaller would not
  correctly convert a value to the provided value type.


0.5.1 (2012-11-16)
------------------

- Type-checking has been removed from the marshalling code::

    if not error and not isinstance(value, data_type):
        error = True

  This change was required to support "schema types" such as::

    import re

    match_email = re.compile(
        r"^(\w&.%#$&'\*+-/=?^_`{}|~]+!)*[\w&.%#$&'"
        r"\*+-/=?^_`{}|~]+@(([0-9a-z]([0-9a-z-]*[0-9a-z])"
        r"?\.)+[a-z]{2,6}|([0-9]{1,3}\.){3}[0-9]{1,3})$",
        re.IGNORECASE).match

    class email(unicode):
        def __new__(cls, string):
          if match_email(string):
              return string

          raise ValueError(u"Not a valid e-mail address.")


0.5.0 (2010-05-28)
------------------

- Fixed ``Errors`` class to use the more obtuse ``__getattr__``
  override; this fixes an issue where an attribute lookup of
  ``__class__`` would fail. [malthe]

- Added ``required`` decorator for field types; when we wrap a type
  with this decorator, inputs that do not validate (even the trivial
  input of the empty string) are given the input value as-is. Compare
  this to an optional field (the default setting) where the empty
  string will be interpreted as a non-input (unless it's a string type
  or another type which will accept the empty string). [malthe]

- Add __contains__/has_key support to the Error class. [wichert]

0.4.2 (2009-09-14)
------------------

- Added ``any`` builtin fallback. [malthe]

0.4.1 (2009-07-31)
------------------

- Added defaultdict emulation class. [malthe]

0.4 (2009-07-29)
----------------

- The selected action, if any, is available in the ``action``
  attribute of a form instance. [malthe]

- Even if form input does not validate, the input is available as-is
  in the ``data`` dictionary. [malthe, rnix]

- Request parameters can now be provided directly as the ``params``
  keyword argument. [malthe]

- Added ``get`` method to errors dictionary. [malthe]

- Errors can now be compared with each other to see if they are the
  same. This makes it easier to test without doctest.

- Made the truth test for the errors object check just for messages in
  itself or it's sub errors. This avoids having the errors object
  saying it is true after accessing a key for which no error exists
  (thus creating a new errors object). [jvloothuis]

- Changed the base class of errors from unicode to object. This makes
  it behave like one would expect when printing etc. [jvloothuis]

0.3.2 (2009-03-09)
------------------

- Shedding unused dependency on 'zope.interface' [jvloothuis]

0.3.1 (2008-10-27)
------------------

- Make it possible to set `prefix` as class attribute. [malthe]

- Fixed issue where action parameters would not get set. [malthe]

0.3 (2008-10-27)
----------------

- Marshalled data is no longer applied when no parameters are
  available from the request. [malthe]

- Made the `errors`-object subclass unicode instead of defaultdict and
  implemented custom string representation function which concatenates
  error messages. [malthe]

0.2 (2008-10-19)
----------------

- Created/improved the abilities for custom validation. [jvloothuis]

- Added form action support. [malthe]

- Reworked marshalling code to handle dynamic dictionary
  keys. [malthe]

- Implemented form data object which facilities the form processing
  flow from applying the request to committing changes to a context
  object. [malthe]

- Integrated the converter into the ``form`` module. [seletz]

- Added ``ValidationErrors`` object, which evaluates to True if validation
  errors occured. [seletz]

- Added ``unicode`` converter. [seletz]

- Added ``converter`` module to support converting and validating request
  parameters sent by a form. [seletz]

- Added logic to allow registering and acquiring template API
  components from templates. [malthe]

- Changed the Skin Template View to be a class, and added a minimal
  interface ISkinTemplate to access the template path [seletz]

- Fixed a bug where we did not tear down the tests correctly [seletz]

- Fixed bug where the INewRequest event handler would call
  templates when checking for their existence [seletz]

0.1 (2008-09-25)
----------------

- Initial release [malthe]

- Added support to dynamically register templates if they
  are added to a registered template directory [seletz]

