Valida...ymbols(3pm)

๐Ÿ“ฆ
version 7.900059 ยท 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

๐Ÿ’… Validation::Class::Directive::MaxSymbols โ€” the 3pm girlies' guide

okay so bestie, welcome to the User Contributed Perl Documentation corner of the internet, where we're talking about Validation::Class::Directive::MaxSymbols ๐ŸŽ€


โœจ NAME โœจ

Validation::Class::Directive::MaxSymbols โ€” it's the MaxSymbols Directive for Validation Class Field Definitions, and it's here to count your symbols so you don't have to ๐Ÿงฎโœจ


๐ŸŒธ VERSION ๐ŸŒธ

version 7.900059 โ€” yes she's got a version, she's got receipts, she's official ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

here's the whole vibe in code, no cap:

use Validation::Class::Simple;

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

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

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

so you spin up your $rules, you tell the password field it's got a max_symbols situation going on, you add your $parameters to $rules->params, and then you hit $rules->validate. if it comes back false, you're in the unless block handling the failures ๐Ÿ˜ญ it's giving very much "the vibes were off, deal with it."


๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so here's the tea: Validation::Class::Directive::MaxSymbols is a core validation class field directive ๐Ÿ’…

what does she do? she validates the length of non-alphanumeric characters in the parameters that are associated with her. that's it, that's the whole job. she counts the symbols โ€” the little non-alphanumeric gremlins ๐Ÿ™ˆ โ€” and she checks whether that count is within the limit you set. main character energy, honestly.


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Al Newkirk <anewkirk@ana.io> โ€” the icon, the legend, the one who wrote this ๐Ÿซถ


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, redistribute it, just respect the terms, periodt ๐Ÿ’œ


๐ŸŒˆ SEE YOU LATER, BESTIE ๐ŸŒˆ

that's the whole page fr fr ๐Ÿ’– this beauty ships as part of perl v5.36.0, and the date on this particular glow-up is 2023-06-11 โญ go forth and validate those symbols, you absolute queen ๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from