Age | Commit message (Collapse) | Author | Files | Lines |
|
that from schema
This allows doing some basic normalization (i.e. removing keys) from the
generated JSON.
|
|
|
|
|
|
This should replace kv_validate() in the future. It's much more generic
and easier to extend.
Inspiration drawn from both kv_validate() and Brannigan.
|
|
The documentation has always implied that fields like required, default,
rmwhitespace, multi, mincount and maxcount could be set in a template,
but that was never supported. Now it does what you expect it to do.
|
|
!!!BACKWARDS INCOMPATIBLE CHANGE!!!
This removes the min and max fields, and instead replaces them with a
'num' template. They're mostly equivalent, but means that a template
field needs to be added when min or max are used. The returned error is
also different, as it now returns [field, 'template', 'int'] instead of
[field, 'min', 10] or something.
The documentation of kv_validate() is pretty awful.
|
|
Fixed bugs:
- The maxcount option didn't work, was more of an alias for mincount
instead.
- rmwhitespace wasn't applied when the field gave an _err.
- The func option didn't accept a non-array as argument.
|