Valida...xDigits(3pm)
π Validation::Class::Directive::MaxDigits π
okay so bestie, welcome to the Validation::Class::Directive::MaxDigits page β it's a directive for Validation Class Field Definitions, from the Validation::Class::Directive::MaxDigits fam, and it lives in the User Contributed Perl Documentation section of the manual (section 3pm, iykyk). let's get into it β¨
πΈ VERSION πΈ
version 7.900059 β that's the vibe, no cap π«Ά
π SYNOPSIS π
here's how you actually use it, bestie:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
password => {
max_digits => 12
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
so you spin up a Validation::Class::Simple object, declare your fields, and give password a max_digits => 12. then you shove your $parameters into $rules->params->add(...), and hit $rules->validate β and if it comes back false, that unless block is your moment to deal with the failures ππ
π¦ DESCRIPTION π¦
Validation::Class::Directive::MaxDigits is a core validation class field directive that validates the length of numeric characters in the associated parameters. that's it, that's the whole job β it's giving "how many digits max, bestie" and it is not playing around π₯
so like, if you said max_digits => 12, then the numeric characters in your parameter better be 12 or fewer. periodt. π
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β the icon, the legend β
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Al Newkirk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go off, remix it, whatever β just keep the terms, fr fr π
aaaand that's the whole page, bestie π«Ά this was perl v5.36.0, dated 2023-06-11, brought to you by the User Contributed Perl Documentation crew. mwah πβ¨
π¦ where this page comes from
- debian trixie: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms