Closed maxwrlr closed 3 years ago
Thanks @maxwrlr, this seems very good. Could you additionally just update the README file in your MR please?
I adjusted the README. I hope what I wrote makes sense.
@maxwrlr thanks for the addition of the doc. It's good now 👍
@maxwrlr see #388
Hello convicts,
the current options do not allow null additionally to any format. To get it working it was always necessary to create a new format around any existing format just to alloww null. What a mess!
This pull request tries to introduce the
nullable
option, which, if truthy, makes convict accept a configured null property before a dedicated format checking function would be called. This change doesn't affect existing behaviour.This could also be seen as a fix for #292 .