15 Jul 2012 13:33:29 UTC
- Distribution: Data-TreeValidator
- Module version: 0.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (566 / 0 / 24)
- KwaliteeBus factor: 0
- 87.50% Coverage
- License: perl_5
- Activity24 month
- Download (20.71KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userCYCLES Oliver Charlesand 1 contributors
- Oliver Charles
- COPYRIGHT AND LICENSE
Data::TreeValidator::Constraints - A collection of constraints for validating data
use Data::TreeValidator::Constraints qw( required );
Constraints currently take a single form, a subroutine reference. If the data does not validate, an exception will be raised (which is caught by process methods). If an exception is not raised, the data will be assumed to be valid.
All methods below are available for importing into using modules
Checks that $input is defined, and stringifies to a true value (not the empty string)
Checks that a given input is between
$max. You do not have to specify both parameters, either or is also fine.
Checks that a given input is in the set defined by
Checks that a given input satisfies a given Moose::Meta::TypeConstraint. E.g.
use MooseX::Types::Moose qw/Num/; type(Num);
This software is copyright (c) 2012 by Oliver Charles <firstname.lastname@example.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Data::TreeValidator, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Data::TreeValidator
For more information on module installation, please visit the detailed CPAN module installation guide.