jpmckinney / validictory

🎓 deprecated general purpose python data validator
Other
240 stars 57 forks source link

Change the defaults for "Schema Options" #69

Closed nueverest closed 10 years ago

nueverest commented 10 years ago

How do I change the defaults for certain schema options?

For Example the documentation about the 'blank' schema option states:

'blank'
If False, validate that string values are not blank (the empty string).
The default value of this parameter is set when initializing SchemaValidator. 
By default it is False.

How do I set the default for blank to "True"?

Some of the json data I need to process has lots of null and optional values. I, unfortunately, have no control over this.

jamesturk commented 10 years ago

you'd just set it in the schema, simply set blank to true on the fields that are allowed to be blank

jamesturk commented 10 years ago

did this work out?

nueverest commented 10 years ago

thanks this works.