Valida...::State(3pm)

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

πŸ’– NAME πŸ’–

Validation::Class::Directive::State β€” the State Directive for Validation Class Field Definitions, bestie. That's the whole vibe. ✨


🌸 VERSION 🌸

version 7.900059 β€” yes, she's got a version number and she's proud of it πŸ’…


✨ SYNOPSIS ✨

okay so here's how you actually use her:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        address_state => {
            state => 1
        }
    }
);

# set parameters to be validated
$rules->params->add($parameters);

# validate
unless ($rules->validate) {
    # handle the failures
}

like, you set up your fields, you add your params, you run validate, and if it comes back false you deal with the fallout. simple as that, no cap 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. Validation::Class::Directive::State is a core validation class field directive that handles state validation for states in the USA. πŸ‡ΊπŸ‡Έ iconic behavior honestly.

the way it works is: states get validated against a list of state names β€” both the abbreviated ones and the long ones β€” and the matching is case-insensitive. so you don't have to stress about capitalization at all, she's not gonna be picky like that. πŸ’…

for example: ny, NY, New York, and new york will all validate. every single one. slay. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Al Newkirk <anewkirk@ana.io> β€” the main character who wrote this. πŸ’œ


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 yeah β€” free software, same terms as Perl 5 itself. go forth and redistribute responsibly bestie 🫑


and that's the whole page!! this one came from perl v5.36.0, dated 2023-06-11, and honestly? a little legend. mwah πŸ’‹ ✨

πŸ“¦ where this page comes from