diff options
author | Yorhel <git@yorhel.nl> | 2018-04-15 10:11:09 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2018-04-15 10:11:11 +0200 |
commit | 1b0025f3140f5ef97a4222784cf2a38aa471d941 (patch) | |
tree | 3d4fa173d8ac1fd1d0bbce2415edf95ad4819bf9 /lib/TUWF.pod | |
parent | fe5943688e9339e46cbec20a93f3ceb80d5d8f01 (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.pod')
-rw-r--r-- | lib/TUWF.pod | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/TUWF.pod b/lib/TUWF.pod index 292bfe6..ff66282 100644 --- a/lib/TUWF.pod +++ b/lib/TUWF.pod @@ -404,6 +404,14 @@ all cookies not having the configured prefix never existed, and removes the prefix when used in list context. C<resCookie()> will simply add the prefix to all outgoing cookies. Default: undef (disabled). +=item custom_validations + +Hashref, custom validations for the L<compile()|TUWF::Misc> and +L<validate()|TUWF::Misc> functions. The recommended way to add new templates is +to call C<TUWF::set()> with a single argument: + + TUWF::set('custom_validations')->{$key} = \%schema; + =item db_login Sets the login information for the L<TUWF::DB|TUWF::DB> functions. Can be set @@ -829,7 +837,7 @@ FastCGI: =head1 SEE ALSO L<TUWF::Intro>, L<TUWF::DB>, L<TUWF::Misc>, L<TUWF::Request>, L<TUWF::Response>, -L<TUWF::XML>. +L<TUWF::XML>, L<TUWF::Validate>. The homepage of TUWF can be found at L<https://dev.yorhel.nl/tuwf|https://dev.yorhel.nl/tuwf>. |