Valida...Zipcode(3pm)
β¨ Valida...Zipcode(3pm) β¨
okay bestie so you're in the <pink>User Contributed Perl Documentation</pink> section, section 3pm for my perl girlies, and we are about to talk about the zipcode directive π
. Yes. Postal codes. In perl. We're doing this.
π NAME π
Validation::Class::Directive::Zipcode β the Zipcode Directive for Validation Class Field Definitions, and yes she is a whole queen of a directive π«Ά
πΈ VERSION πΈ
version 7.900059 β that's the one, no cap β¨
π¦ SYNOPSIS π¦
here's the vibe, copy this energy fr fr:
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
address_zipcode => {
zipcode => 1
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
so like, you make your Validation::Class::Simple object, you declare a field (address_zipcode) and you set zipcode => 1 on it and boom π₯ that field is now zipcode-checked. then you add your $parameters into $rules->params->add(...), you call $rules->validate, and if it fails (the unless is doing the heavy lifting here bestie, it's giving reverse logic π) you go handle the failures. periodt.
π DESCRIPTION π
Validation::Class::Directive::Zipcode is a core validation class field directive, meaning she comes built-in, she's not a special guest, she lives here π
and what does she do? she handles postal-code validation for areas in the USA and North America πΊπΈπ. that's it. that's the job. zipcode validation for the USA and North America and she does it flawlessly, main character energy only π
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β the icon who made this happen, we stan π
π 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. so like, it's free, it's free-free, go off, remix it, redistribute it, the licensing said so π
β and that's the whole page bestie, you're now fully fluent in Zipcode π
perl v5.36.0 Β· 2023-06-11 β that's the version and date this lil page was generated, consider this my lil sign-off, 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