Valida...::Label(3pm)

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

πŸ’– Valida...::Label(3pm) πŸ’–

ok bestie, welcome to the Validation::Class::Directive::Label page β€” it's part of the User Contributed Perl Documentation, section 3pm, so you already know it's giving ✨docs✨ energy.


🌸 NAME 🌸

Validation::Class::Directive::Label β€” the Label Directive for Validation Class Field Definitions. yes that's the whole name, it's long, we love her anyway πŸ’…


⭐ VERSION ⭐

version 7.900059 β€” that's the number, no notes, don't @ me 🫢


πŸŽ€ SYNOPSIS πŸŽ€

ok so this is how you actually use her:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        user_ssn => {
            label => 'User Social Security Number'
        }
    }
);

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

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

see? you make your $rules, you give a field (user_ssn) a label, you add your $parameters to $rules->params, and then you validate. if validate comes back false, that's your cue to go # handle the failures πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so Validation::Class::Directive::Label is a core validation class field directive β€” one of the main-character directives, not some side character. and what does she do? she holds a user-friendly string (name) that represents the field she's attached to. that's it. that's the job. she makes your field look cute and readable instead of all user_ssn-coded. literally the glow-up directive πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Al Newkirk <anewkirk@ana.io> β€” the icon, the legend, the one who wrote her 🫢


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 wild, but read the Perl 5 terms first bestie, iykyk πŸ’…


and that's the whole page!! sign-off time: this was perl v5.36.0, dated 2023-06-11, and yeah the footer also says Valida...::Label(3pm) because it's the same page, slay ⭐ no cap, that's everything, go label your fields πŸ’œ

πŸ“¦ where this page comes from