Valida...::City(3pm)
π Valida...::City(3pm) π
okay so bestie, this is a page from the User Contributed Perl Documentation section, and it's giving very specific energy. sit down, grab a π, let's get into it.
β¨ NAME β¨
Validation::Class::Directive::City β the City Directive for Validation Class Field Definitions. yes, that's the whole name, it's a mouthful, we love her anyway. π
πΈ VERSION πΈ
version 7.900059
(she's got numbers, and she's proud of them π )
π¦ SYNOPSIS π¦
okay so here's literally how you use it, copy-paste core:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
address_city => {
city => 1
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
so you set up your $rules with a fields hash, you give address_city a city => 1 and boom, the vibe check is armed. β¨ then you shove your $parameters into $rules->params->add($parameters) β that's the "here's the stuff, pls judge it" step. and then $rules->validate does the actual work. if it comes back false, you're in the unless block handling the failures, which is the "cry a little and deal with it" step ππ«Ά
π DESCRIPTION π
so Validation::Class::Directive::Between is a core validation class field directive (yes, the doc says Between right there in a page about City β we don't question the ancestors, we just respect them π) and what she does is give you the ability to perform city/area validations for cities in the USA. πΊπΈ
and the best part? Cities will be validated without regard for case. so portland, Portland, PORTLAND β all the same to her. case-insensitive queen behavior, no cap. π
β¨
π AUTHOR π
Al Newkirk <anewkirk@ana.io>
(shoutout to Al, iconic, main character energy fr fr π)
π 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.
β heads up bestie: those license lines are the legal tea, so keep them exactly as they are β free software, same terms as Perl 5 itself, periodt.
and that's the whole page!! this was Valida...::City(3pm) from perl v5.36.0, dated 2023-06-11 β mwah, go validate some cities, you absolute legend ππ¦π
π¦ 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