Valida...::Error(3pm)
π Validation::Class::Directive::Error π
okay bestie, so this page is from the Perl docs, third section, and the whole thing is filed under the name Valida...::Error(3pm) β that's the title, that's the manual name, and now it's our whole personality for the next five minutes π«Ά
It's the Error Directive for Validation Class Field Definitions. Yes, that is the actual full name. Yes, it's a mouthful. No, we're not shortening it, it's iconic.
β¨ VERSION β¨
version 7.900059 β that's the one, no cap π
πΈ SYNOPSIS πΈ
here's the vibe, bestie, a whole little love story between you and your validation rules:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
username => {
error => 'This is not a valid username'
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
so you make your $rules, you tell it what fields look like, you set your error message, then you yeet your $parameters into $rules->params->add($parameters), then you validate β and if it doesn't pass, girl, you # handle the failures π
π¦ DESCRIPTION π¦
Validation::Class::Directive::Error is a core validation class field directive, and what it does is hold the error message that will supersede any other error messages that attempt to register errors at the field-level for the associated field.
read that again bestie. it's not a message. it's THE message. it overrides all the other little messages that try to register errors at the field-level for the field it's attached to. main character energy fr fr π
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β we stan, the legend themselves π«Ά
π 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. π
and that's the whole page, babe β generated with perl v5.36.0 on 2023-06-11, sourced from the one and only Valida...::Error(3pm) π slay, you're a validation expert now, periodt β¨
π¦ 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