Valida...::Alias(3pm)
β¨ NAME β¨
Validation::Class::Directive::Alias β the Alias Directive for Validation Class Field Definitions, bestie π (you'll see it as Valida...::Alias(3pm) in your man pager because man pages love to truncate things, but that's the one)
πΈ VERSION πΈ
version 7.900059 β yes we're on the 7.900059 era, iconic behavior
π SYNOPSIS π
okay so here's the vibe, literally just:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
login => {
alias => 'username'
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
like, you set up your field with an alias, you add your $parameters, you run validate, and if it's giving failure you handle it. no cap. π
π¦ DESCRIPTION π¦
Validation::Class::Directive::Alias is a core validation class field directive and its whole job β its moment, its purpose, its main character arc β is giving you the ability to map arbitrary parameter names with a field's parameter value. that's it. that's the directive. π«Ά
- alternative argument: an-array-of-aliases π
bestie listen, this directive can be passed a single value or an array of values. both are valid. she contains multitudes:
fields => {
login => {
alias => ['username', 'email_address']
}
}
so now login is answering to username AND email_address. one field, many names, very much the way that a queen with several aliases operates π
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β the legend, the blueprint, the whole reason this exists π
π 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. fr fr, go off, remix it, it's yours π©·
and that's the whole page bestie β this one came from perl v5.36.0 and got stamped on 2023-06-11, so you know it's the real deal. mwah πβ¨
π¦ 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