News
====

SVN trunk
---------

* Fixed up all the documentation.

* Validator ``__doc__`` attributes will include some
  automatically-appended information about all the message strings
  that validator uses.

* Deprecated ``formencode.htmlform`` module, because it is dumb.

* Added an ``.all_messages()`` method to all validators, primarily
  intended to be used for documentation purposes.

* Changed preferred name of ``StringBoolean`` to ``StringBool`` (to go
  with ``bool`` and ``validators.Bool``).  Old alias still available.

* Added ``today_or_after`` option to ``validators.DateValidator``.

* Added a ``validators.FileUploadKeeper`` validator for helping with
  file uploads in failed forms.  It still requires some annoying
  fiddling to make work, though, since file upload fields are so
  weird.

* Added ``text_as_default`` option to htmlfill.  This treats all
  ``<input type="something-weird">`` elements as text fields.  WHAT-WG
  adds weird input types, which can usually be usefully treated as
  text fields.

* Make all validators accept empty values if ``not_empty`` is False
  (the default).  "Empty" means ``""`` or ``None``, and will generally
  be converted None.

* Added ``accept_python`` boolean to all ``FancyValidator`` validators
  (which is most validators).  This is a fixed version of the broken
  ``validate_python`` boolean added in 0.3.  Also, it defaults to
  true, which means that all validators will not validate during
  ``.from_python()`` calls by default.

* Added ``htmlfill.render(form, defaults, errors)`` for easier
  rendering of forms.

* Errors automatically inserted by ``htmlfill`` will go at the top of
  the form if there's no field associated with the error (raised an
  error in 0.3).

* Added ``formencode.sqlschema`` for wrapping SQLObject
  classes/instances.  See the docstring for more.

* Added ``ignore_key_missing`` to ``Schema`` objects, which ignore
  missing keys (where fields are present) when no ``if_missing`` is
  provided for the field.

* Renamed ``validators.StateProvince.extraStates`` to
  ``extra_states``, to normalize style.

Bugfixes
~~~~~~~~

* When checking destinations, ``validators.URL`` now allows redirect
  codes, and catches socket errors and turns them into proper errors.

* Fix typo in ``htmlfill``

* Made URL and email regular expressions a little more lax/correct.

* A bunch of fixes to ``validators.SignedString``, which apparently
  was completely broken.

0.3
-----

* Allow errors to be inserted automatically into a form when using
  ``formencode.htmlfill``, when a ``<form:error>`` tag isn't found for
  an error.

* Added ``if_key_missing`` attribute to ``schema.Schema``, which will
  fill in any keys that are missing and pass them to the validator.

* ``FancyValidator`` has changed, adding ``if_invalid_python`` and
  ``validate_python`` options (which also apply to all subclasses).
  Also ``if_empty`` only applies to ``to_python`` conversions.

* ``FancyValidator`` now has a ``strip`` option, which if true and if
  input is a string, will strip whitespace from the string.

* Allow chained validators to validate otherwise-invalid forms, if
  they define a ``validate_partial`` method.  The credit card
  validator does this.

* Handle ``FieldStorage`` input (from file uploads); added a
  ``formencode.fieldstorage`` module to wrap those instances in
  something a bit nicer.  Added
  ``validators.FieldStorageUploadConverter`` to make this conversion.

* Added ``StringBoolean`` converter, which converts strings like
  ``"true"`` to Python booleans.

Bugfixes
~~~~~~~~

* A couple fixes to ``DateConverter``, ``FieldsMatch``,
  ``StringBoolean``, ``CreditCardValidator``.

* Added missing ``Validator.assert_string`` method.

* ``formencode.htmlfill_schemabuilder`` handles checkboxes better.

* Be a little more careful about how ``Invalid`` exceptions are
  created (catch some errors sooner).

* Improved handling of non-string input in ``htmlfill``.

Experiments
~~~~~~~~~~~

* Some experimental work in ``formencode.formgen``.  Experimental, I
  say!

* Added an experimental ``formencode.context`` module for
  dynamically-scoped variables.
