Valida...::Mixin(3pm)
π Valida...::Mixin(3pm) β the whole vibe π
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's filed under Valida...::Mixin(3pm). Short one, but it's iconic β let's go π«Ά
β¨ NAME β¨
Validation::Class::Directive::Mixin β the Mixin Directive for Validation Class Field Definitions. that's literally it, that's the whole name, no notes π
πΈ VERSION πΈ
version 7.900059 β yes, that's the actual number, no I will not be rounding it π
π¦ SYNOPSIS π¦
okay so here's the whole thing in action, look at her:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
mixins => {
basic => {
required => 1,
filters => ['trim', 'strip']
}
}
fields => {
full_name => {
mixin => 'basic'
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
see how we made a lil basic mixin with required => 1 and filters => ['trim', 'strip'], then just dropped mixin => 'basic' onto the full_name field? that's the whole move, so clean, so effortless, main character energy fr fr β¨
π DESCRIPTION π
so Validation::Class::Directive::Mixin is a core validation class field directive, and what it does β the entire job, no cap β is it determines what directive templates will be merged with the associated field. that's it. it's the little connector, the group-chat admin of directives, pulling a template in and merging it right onto your field. lowkey obsessed with how simple that is πΈ
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β the author, the moment, the legend π«Ά
π COPYRIGHT AND LICENSE π
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. periodt. π
and that's the page bestie!! short, sweet, slayed π
made with love for perl v5.36.0, dated 2023-06-11, filed under Valida...::Mixin(3pm) πβ
π¦ where this page comes from
- debian trixie: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms