Valida...ectives(3pm)

📦
version 7.900059 · 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

💖 Validation::Class::Directives — the manual page 💖

okay so first things first, bestie: this whole page is the man page for Validation::Class::Directives (you'll see it truncated as Valida...ectives(3pm) in the header, she's just shy, don't worry about it) from User Contributed Perl Documentation. It's the core directives registry and we're gonna go through every single one, no skips, periodt ✨


🌸 NAME 🌸

Validation::Class::Directives — the Validation::Class Core Directives Registry 🎀


🦋 VERSION 🦋

version 7.900059 — yes bestie she's got a whole six-digit flex going on 💅


🌈 DESCRIPTION 🌈

Validation::Class::Directives is literally a whole collection of the installed Validation::Class directives, all sitting pretty in one place 🫶

This class inherits from Validation::Class::Mapping — so that's her mom, basically 👑

And if you're the DIY type and you wanna build your own directives from scratch? Go look at Validation::Class::Directive, that's where the whole developing-your-own-directives lore lives 📖✨


🔥 RATIONALE 🔥

So here's the tea ☕ — what follows is the full list of core directives that get installed automatically with Validation::Class, and you can absolutely use them to jump-start your whole data validation initiative 🚀

⚠️ Please Note! The whole point of the core directives is merely to give you a reasonable layer of protection against bad/malformed data. These validators are not very sophisticated, okay? They were created using a minimal level of strictness. Like — the email and hostname directives do not perform a hostname lookup, and the email directive does not conform to the RFC specification. Not even a little. So don't come for her 💀

And why is that, you ask? Because different apps have wildly different levels of strictness for different kinds of input, bestie. Like, a hospital API may need a way more sophisticated SSN validation than, say, a department of education API would. Same energy with email — an email service API might want fancier email validation than a file sharing API ever would. Every app is different, every vibe is different 🌈

Validation::Class does not attempt to provide validators for all levels of strictness. The core directives exist to support typical use-cases with a minimal level of strictness. That's the whole assignment 💅


✨ alias ✨

The alias directive is provided by Validation::Class::Directive::Alias and handles parameter aliases 🎀

✨ between ✨

The between directive is provided by Validation::Class::Directive::Between and handles numeric range validation 🔢

✨ city ✨

The city directive is provided by Validation::Class::Directive::City and handles city/area validation for cities in the USA 🇺🇸

✨ creditcard ✨

The creditcard directive is provided by Validation::Class::Directive::Creditcard and handles validation for: american express, bankcard, diners card, discover card, electron, enroute, jcb, maestro, mastercard, solo, switch, visa and voyager credit cards 💳 (she does the whole roster, no cap)

✨ date ✨

The date directive is provided by Validation::Class::Directive::Date and handles validation of simple date formats 📅

✨ decimal ✨

The decimal directive is provided by Validation::Class::Directive::Decimal and handles validation of floating point integers 🔢

✨ default ✨

The default directive is provided by Validation::Class::Directive::Default and holds the value which should be used if no parameter is supplied 🎁

✨ depends_on ✨

The depends_on directive is provided by Validation::Class::Directive::DependsOn and validates the existence of dependent parameters 🔗

✨ email ✨

The email directive is provided by Validation::Class::Directive::Email and checks the validity of the email address specified by the associated parameters — within reason, okay? 😭

⚠️ Heads up bestie: the email directive does not perform a host lookup, and it does not conform to the RFC specification. That's just the deal.

✨ error ✨

The error directive is provided by Validation::Class::Directive::Error and holds the error message that will supersede any other error messages that try to register errors at the field-level for the associated field 👑

✨ errors ✨

The errors directive is provided by Validation::Class::Directive::Errors and is a container (object) which holds error message registered at the field-level for the associated field 🗂️

✨ filtering ✨

The filtering directive is provided by Validation::Class::Directive::Filtering and specifies whether filtering and sanitation should occur as a pre-process or post-process 🚿

✨ filters ✨

The filters directive is provided by Validation::Class::Directive::Filters and specifies which filter should be executed on the associated field 🧼

✨ hostname ✨

The hostname directive is provided by Validation::Class::Directive::Hostname and handles validation of server hostnames 🖥️

✨ label ✨

The label directive is provided by Validation::Class::Directive::Label and holds a user-friendly string (name) representing the associated field 🏷️

✨ length ✨

The length directive is provided by Validation::Class::Directive::Length and validates the exact length of the associated parameters 📏

✨ matches ✨

The matches directive is provided by Validation::Class::Directive::Matches and validates whether the value of the dependent parameters matches that of the associated field 🪞

✨ max_alpha ✨

The max_alpha directive is provided by Validation::Class::Directive::MaxAlpha and validates the length of alphabetic characters in the associated parameters 🔤

✨ max_digits ✨

The max_digits directive is provided by Validation::Class::Directive::MaxDigits and validates the length of numeric characters in the associated parameters 🔢

✨ max_length ✨

The max_length directive is provided by Validation::Class::Directive::MaxLength and validates the length of all characters in the associated parameters 📏

✨ max_sum ✨

The max_sum directive is provided by Validation::Class::Directive::MaxSum and validates the numeric value of the associated parameters ➕

✨ max_symbols ✨

The max_symbols directive is provided by Validation::Class::Directive::MaxSymbols and validates the length of non-alphanumeric characters in the associated parameters ✨

✨ messages ✨

The messages directive is provided by Validation::Class::Directive::Messages and is a container (object) which holds error message which will supersede the default error messages of the associated directives 👑

✨ min_alpha ✨

The min_alpha directive is provided by Validation::Class::Directive::MinAlpha and validates the length of alphabetic characters in the associated parameters 🔤

✨ min_digits ✨

The min_digits directive is provided by Validation::Class::Directive::MinDigits and validates the length of numeric characters in the associated parameters 🔢

✨ min_length ✨

The min_length directive is provided by Validation::Class::Directive::MinLength and validates the length of all characters in the associated parameters 📏

✨ min_sum ✨

The min_sum directive is provided by Validation::Class::Directive::MinSum and validates the numeric value of the associated parameters ➖

✨ min_symbols ✨

The min_symbols directive is provided by Validation::Class::Directive::MinSymbols and validates the length of non-alphanumeric characters in the associated parameters ✨

✨ mixin ✨

The mixin directive is provided by Validation::Class::Directive::Mixin and determines what directive templates will be merged with the associated field 🧬

✨ mixin_field ✨

The mixin_field directive is provided by Validation::Class::Directive::MixinField and determines what fields will be used as templates and merged with the associated field 🧬

✨ multiples ✨

The multiples directive is provided by Validation::Class::Directive::Multiples and validates whether the associated parameters may contain a multi-value (an array of strings) 🧺

✨ name ✨

The name directive is provided by Validation::Class::Directive::Name and merely holds the name of the associated field. This value is populated automatically — she does it herself, no help needed 💅

✨ options ✨

The options directive is provided by Validation::Class::Directive::Options and holds an enumerated list of values to be validated against the associated parameters 📋

✨ pattern ✨

The pattern directive is provided by Validation::Class::Directive::Pattern and handles validation of simple patterns and complex regular expressions 🧩

✨ readonly ✨

The readonly directive is provided by Validation::Class::Directive::Readonly and determines whether the associated parameters should be ignored 🙈

✨ required ✨

The required directive is provided by Validation::Class::Directive::Required and handles validation of supply and demand ⚖️

✨ ssn ✨

The ssn directive is provided by Validation::Class::Directive::SSN and handles validation of social security numbers in the USA 🇺🇸

✨ state ✨

The state directive is provided by Validation::Class::Directive::State and handles state validation for states in the USA 🇺🇸

✨ telephone ✨

The telephone directive is provided by Validation::Class::Directive::Telephone and handles telephone number validation for the USA and North America ☎️

✨ time ✨

The time directive is provided by Validation::Class::Directive::Time and handles validation for standard time formats ⏰

✨ toggle ✨

The toggle directive is provided by Validation::Class::Directive::Toggle and is used internally to handle validation of per-validation-event requirements 🎚️

✨ uuid ✨

The uuid directive is provided by Validation::Class::Directive::UUID and handles validation of Globally/Universally Unique Identifiers 🆔

✨ validation ✨

The validation directive is provided by Validation::Class::Directive::Validation and is used to execute user-defined validation routines 🛠️

✨ value ✨

The value directive is provided by Validation::Class::Directive::value and holds the absolute value of the associated field 💎

✨ zipcode ✨

The zipcode directive is provided by Validation::Class::Directive::Zipcode and handles postal-code validation for areas in the USA and North America 📮


👑 AUTHOR 👑

Al Newkirk <anewkirk@ana.io> — icon, legend, the moment 💜


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, go off, share the love 🫶


and that's the whole page bestie, you ate it, you read every single directive, I'm so proud 🥹

perl v5.36.0 · 2023-06-11 · Valida...ectives(3pm) — that's the version, the date and the manual name, all wrapped up in a little bow for you 🎀 byeee 💖✨

📦 where this page comes from