Valida...nField(3pm)

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

✨ NAME ✨

Okay so bestie, this page is all about Validation::Class::Directive::MixinField β€” the MixinField Directive for Validation Class Field Definitions πŸ’…

(Also, fun fact, the manual name is Valida...nField(3pm), but we're folding that in right here at the top so it doesn't get its own lonely line. You're welcome 🫢)


πŸŽ€ VERSION πŸŽ€

This is version 7.900059 β€” yes, that's a lot of digits, and yes, she earned every single one of them πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the vibe, no cap:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        first_name => {
            required => 1,
            filters  => ['trim', 'strip']
        },
        last_name => {
            mixin_field => 'first_name'
        }
    }
);

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

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

See how last_name is just out here copying first_name's whole flow? That's the mixin_field moment. She said "I'll have what she's having" πŸ’€βœ¨


🌸 DESCRIPTION 🌸

Validation::Class::Directive::MixinField is a core validation class field directive β€” and what she does is genuinely iconic: she determines what fields will be used as templates and merged with the associated field.

So like… you pick a field, point at it, and go "be more like them." Main character energy fr fr πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Al Newkirk <anewkirk@ana.io> wrote this. Respect the OG πŸ«‘πŸ’œ


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 bestie, it's free, it's open, it's giving generous πŸ’–


And that's the whole page, bestie! This was pulled from perl v5.36.0, dated 2023-06-11, under the manual name Valida...nField(3pm) β€” mwah, slay, periodt πŸ’…βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from