1Validation::Class::DireUcsteirveC:o:nVtarliibduatVteaidloinPd(ea3rt)lioDno:c:uCmleanstsa:t:iDoinrective::Validation(3)
2
3
4

NAME

6       Validation::Class::Directive::Validation - Validation Directive for
7       Validation Class Field Definitions
8

VERSION

10       version 7.900059
11

SYNOPSIS

13           use Validation::Class::Simple;
14
15           my $rules = Validation::Class::Simple->new(
16               fields => {
17                   example_data => {
18                       validation => sub {
19
20                           my ($self, $proto, $field, $params) = @_;
21                           # user-defined validation should return true/false
22
23                       }
24                   }
25               }
26           );
27
28           # set parameters to be validated
29           $rules->params->add($parameters);
30
31           # validate
32           unless ($rules->validate) {
33               # handle the failures
34           }
35

DESCRIPTION

37       Validation::Class::Directive::Validation is a core validation class
38       field directive that is used to execute user-defined validation
39       routines. This directive always takes a sub-routine and should return
40       true or false.
41

AUTHOR

43       Al Newkirk <anewkirk@ana.io>
44
46       This software is copyright (c) 2011 by Al Newkirk.
47
48       This is free software; you can redistribute it and/or modify it under
49       the same terms as the Perl 5 programming language system itself.
50
51
52
53perl v5.38.0                      20V2a3l-i0d7a-t2i1on::Class::Directive::Validation(3)
Impressum