Valida...ltiples(3pm)

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

πŸ’– Valida...ltiples(3pm) β€” Validation::Class::Directive::Multiples πŸ’–

okay bestie, gather round, because we're about to talk about the Multiples directive from Validation::Class::Directive::Multiples and honestly? it's giving "tiny module, big responsibility" πŸ‘‘


✨ NAME ✨

Validation::Class::Directive::Multiples β€” the Multiples Directive for Validation Class Field Definitions πŸŽ€


🌸 VERSION 🌸

version 7.900059 β€” yes ma'am, that's the one, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole vibe, copy it exactly, don't be creative with it bestie:

use Validation::Class::Simple;

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

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

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

literally that's it. that's the whole glow-up arc 🌈


πŸ‘‘ DESCRIPTION πŸ‘‘

so, Validation::Class::Directive::Multiples is a core validation class field directive, and what it does is check whether the parameters it's attached to are allowed to hold a multi-value β€” which is to say, an array of strings πŸ“

that's the whole job. one job. and it ate. πŸ’…


πŸ’œ AUTHOR πŸ’œ

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


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 forth and remix, bestie, it's legally a slay ✨


lowkey a reminder that "free software" here means those exact Perl 5 terms, not "do whatever, no rules" β€” keep the license vibes intact, okay? πŸ™ˆ

mwah πŸ’‹ and that's the page, fr fr β€” this one's from perl v5.36.0, dated 2023-06-11, so if you're reading this in the group chat later, just know the lore checks out πŸ¦‹β­

πŸ“¦ where this page comes from