1Validation::Class::DireUcsteirveC:o:nDterciibmuatle(d3V)PaelrildaDtoicounm:e:nCtlaatsiso:n:Directive::Decimal(3)
2
3
4

NAME

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

VERSION

10       version 7.900057
11

SYNOPSIS

13           use Validation::Class::Simple;
14
15           my $rules = Validation::Class::Simple->new(
16               fields => {
17                   amount_paid  => {
18                       decimal => 1
19                   }
20               }
21           );
22
23           # set parameters to be validated
24           $rules->params->add($parameters);
25
26           # validate
27           unless ($rules->validate) {
28               # handle the failures
29           }
30

DESCRIPTION

32       Validation::Class::Directive::Decimal is a core validation class field
33       directive that provides validation of floating point integers.
34
35       ·       alternative argument: a-single-variable-value
36
37       ·       option: 0 e.g. Any number of decimal places, including none
38
39       ·       option: 1 e.g. Any number of decimal places greater than 0, or
40               a float|double
41
42       ·       option: $n e.g. Exactly that many number of decimal places
43
44               This directive can be passed a single value only:
45
46                   fields => {
47                       amount_paid  => {
48                           decimal => 2 # 2 decimal places
49                       }
50                   }
51

AUTHOR

53       Al Newkirk <anewkirk@ana.io>
54
56       This software is copyright (c) 2011 by Al Newkirk.
57
58       This is free software; you can redistribute it and/or modify it under
59       the same terms as the Perl 5 programming language system itself.
60
61
62
63perl v5.28.0                      2015-V1a0l-i2d1ation::Class::Directive::Decimal(3)
Impressum