summaryrefslogtreecommitdiff
path: root/lib/TUWF.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-04-15 10:11:09 +0200
committerYorhel <git@yorhel.nl>2018-04-15 10:11:11 +0200
commit1b0025f3140f5ef97a4222784cf2a38aa471d941 (patch)
tree3d4fa173d8ac1fd1d0bbce2415edf95ad4819bf9 /lib/TUWF.pm
parentfe5943688e9339e46cbec20a93f3ceb80d5d8f01 (diff)
Integrate TUWF::Validate with the rest of TUWF
- Add a 'custom_validations' setting - Add tuwf->compile() to compile with that setting - Add tuwf->validate() as alternative to formValidate() The new tuwf->validate() uses internal state of TUWF::Request, which had to be changed a bit to allow for more efficient validation. Nested schemas in TUWF::Validate now also accept compiled schemas. This stuff totally needs more documentation.
Diffstat (limited to 'lib/TUWF.pm')
-rw-r--r--lib/TUWF.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/TUWF.pm b/lib/TUWF.pm
index 7487ab7..6818f9e 100644
--- a/lib/TUWF.pm
+++ b/lib/TUWF.pm
@@ -38,6 +38,7 @@ our $OBJ = bless {
sprintf "[%s] %s -> %s\n", scalar localtime(), $uri, $msg;
},
validate_templates => {},
+ custom_validations => {},
# No particular selection of MIME types
mime_types => {qw{
7z application/x-7z-compressed