News

Contents

1.2.2

1.2.1

1.2

1.1

1.0.1

1.0

0.9

Backward incompatible changes

  • The notion of "empty" has changed to include empty lists, dictionaries, and tuples. If you get one of these values passed into (or generated by) a validator with not_empty=True you can get exceptions where you didn't previously.

Enhancements

  • Added support for Paste's MultiDict dictionary as input to Schema.to_python, by converting it to a normal dict via MultiDict.mixed. Previously MultiDicts wouldn't work with CompoundValidators (like ForEach)
  • Added encoding parameter to htmlfill, which will handle cases when mixed str and unicode objects are used (turning all str objects into unicode)
  • Include formencode.validators.InternationalPhoneNumber from W-Mark Kubacki.
  • validators.Int takes min and max options (from Felix Schwarz).
  • You can control the missing message (which by default is just "Missing Value") using the message "missing" in a validator (also from James Gardner).
  • Added validators.CADR (for IP addresses with an optional range) and validators.MACAddress (from Christoph Haas).

Bug Fixes

  • Be friendlier when loaded from a zip file (as with py2exe); previously only egg zip files would work.
  • Fixed bug in htmlfill when a document ends with no trailing text after the last tag.
  • Fix problem with HTMLParser's default unescaping routing, which only understood a very limited number of entities in attribute values.
  • Fix problem with looking up A records for email addresses.
  • validators.String now always returns strings. It also converts lists to comma-separated strings (no [...]), and can encode unicode if an encoding parameter is given. Empty values are handled better.
  • validators.UnicodeString properly handles non-Unicode inputs.
  • Make validators.DateConverter serialize dates properly (from James Gardner).
  • Minor fix to setup.py to make FormEncode more friendly with zc.buildout.

0.7.1

0.7

0.6

0.5.1

0.5

0.4

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

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.