summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2018-06-17Validate::Interop::coerce_for_json(): Add "unknown" config option + inherit ↵Yorhel1-2/+7
that from schema This allows doing some basic normalization (i.e. removing keys) from the generated JSON.
2018-06-10Add experimental TUWF::Validate::Interop moduleYorhel1-0/+90
2018-05-11TUWF::Validate: Add enum validationYorhel1-0/+7
2018-04-14Add experimental TUWF::Validate moduleYorhel1-0/+236
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.
2015-09-20kv_validate(): Allow templates to set more fieldsYorhel1-0/+27
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.
2015-09-19kv_validate(): Pass fields to 'func's and add some default templatesYorhel1-37/+130
!!!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.
2015-09-19Add test for kv_validate() and fix some bugsYorhel1-0/+223
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.