Valida...nDigits(3pm)

πŸ“¦
version 7.900059 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Validation::Class::Directive::MinDigits β€” the MinDigits directive, bestie πŸ’–

okay so real talk, this one lives in the Validation::Class::Directive::MinDigits corner of the Validation::Class universe, and it's the directive you reach for when you need to count the digits in a field. it's giving "core directive energy" and honestly? iconic. πŸ’…

this page is Valida...nDigits(3pm) from the User Contributed Perl Documentation, and yes the terminal chopped the name like that, that's just how man pages do, don't worry about it 🫢


🌟 VERSION 🌟

version 7.900059 β€” no cap, that's the number ✨


✨ SYNOPSIS ✨

here's the whole vibe, copy-paste ready:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        password => {
            min_digits => 1
        }
    }
);

then you feed it your params, bestie:

# set parameters to be validated
$rules->params->add($parameters);

and you run the validation check:

# validate
unless ($rules->validate) {
    # handle the failures
}

like, if validate comes back false you go handle the failures, that's the whole loop πŸŒ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Validation::Class::Directive::MinDigits is a core validation class field directive that validates the length of numeric characters in the associated parameters.

read that again slowly: it's checking the length of the numeric characters. so min_digits => 1 means you need at least one digit character in there, fr fr. it's a core directive, it's got main character energy, and it does exactly one job and does it flawlessly πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Al Newkirk <anewkirk@ana.io> β€” the legend, the moment, the blueprint 🌈


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 yes you can redistribute it, yes you can modify it, same terms as the Perl 5 programming language system itself, that's the deal and it's a good deal πŸ’œ

and that's the whole page, bestie πŸ’– this was generated by perl v5.36.0 back on 2023-06-11 β€” go validate something cute, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from