current version: 0.1.3
- Fixed a problem with
filters.strings.slugify
that was causing the parser to insert double -- when certain punctuation was surrounded by spaces. - Ensured indempotency with
filters.strings.slugify
given new parser code.
- Uncovered and fixed a deprecation warning from 2.6
- Changed the result printer so that it uses the "canonical name" always.
- Major internal refactor of the Schema class, API of course remains unbroken.
- Addition of several options:
Schema.strip_missing
,Schema.strip_blank
,Schema.alts
- Better pathway for handling missing, blank and required value distinction.
- Performance enhancements
- Updated README
- Required behavior bugfix
- Fixed a behavior with required field checking so that missing fields are not validated. Eventually might refactor the entire way the schema processes input...
- Renamed
Schema.name
toSchema.schema_name
to eliminate the collision caused due to the frequent and obvious need for a field called "name".
strings._pre_hook
now convertsNoneType
to empty string if received.
- Added the
strings.key_lookup
filter. This is used for creating lookup dictionaries to convert input values to logical equivalents. For example,schema.state_name.key_lookup({'MA': 'Massachusetts'})
would convert an incoming value of "MA" to "Massachusetts". You can set missing key behavior vianomatch
param.
- Added support for dict-based schema definitions via
Schema.from_dict(dict_scheme, **kwargs)
- Fixed
collections.drop_keys
andcollections.contains
to support*args
for convenience.
- BUGFIX: validating required fields now properly recognizes fields supplied with alternate names
- Added the
casting.decimal
filter and tests. - Added
Schema.results
not sure why this was not added earlier. Brain fail. - Added full unicode support via
Schema(force_unicode=True)
. Leaving this set to True will cause the schema and the data input to be intelligently casted to unicode where appropriate.
- Added the
money.credit_card
filter and tests - Added a test for
logical.constant
- Added the
casting.none
filter - Added the
match
,require
,blank
, andextra
options to the schema. - Added a LICENSE...
- If a
Field
is present, blank is NOT allowed by default. However,Field
is OPTIONAL by default. - Removed the
casting.jsbool
filter because of redundant functionality. Just usecasting.none
in conjunction withcasting.strbool
. You will need to make sure toField.blank(True)
if you want to accept NoneType values such as 'undefined'.
- Added a prehook
_strip
option for ALL string validators. The option isTrue
by default and will invoke thestrip()
validator on all string validators. - Added the following filter modules
[casting, chrono, collection, logical]
- Added tests for
strings.canonize
andstrings.slugify
- Fixed the
web.ipv4
validator so that it actually verifies the values of the octets :0 - Added the following filters:
[casting.boolean, casting.jsbool, casting.strbool, casting.integer, casting.longint, casting.numeric]
- filters continued:
[web.url, casting.string, chrono.date, chrono.time, chrono.datetime, chrono.time_before, chrono.time_after, chrono.time_between]
- Added a schema-level
match
option used like so:s = Schema('my_schema', match={'password': 'password_confirm'})
- Changed the name of the
strings.numeric
validator tostrings.numeric_string
to differentiate it from thecasting.numeric
filter. Remember that filters are thrust into a global namespace as part of the API's brevity. - Added tests for the chrono module
- Added in travis-ci with coveralls and pypins