Valida...Zipcode(3pm)

πŸ“¦
version 7.900059 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 πŸ’œ


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