Valida...dation(3pm)

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

✨ NAME ✨

Validation::Class::Directive::Validation β€” bestie, it's the Validation Directive for Validation Class Field Definitions πŸ’… (yes the manual page is called Valida...dation(3pm) and yes that's iconic of it)


🌸 VERSION 🌸

version 7.900059 β€” no cap, that's the one 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the vibe, literally copy-paste coded:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        example_data => {
            validation => sub {

                my ($self, $proto, $field, $params) = @_;
                # user-defined validation should return true/false

            }
        }
    }
);

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

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

πŸ’– DESCRIPTION πŸ’–

Validation::Class::Directive::Validation is a core validation class field directive whose whole job is running user-defined validation routines. The way that it always takes a sub-routine and should return true or false? That's the moment. periodt. πŸ’€βœ¨


πŸ‘‘ 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. slay, free software fr fr 🌈


and that's the whole page bestie!! 🧚 this lil doc came from perl v5.36.0, dated 2023-06-11, and the manual name is Valida...dation(3pm) in case the vibe check required it πŸ’œ go validate something, you got this πŸ’…βœ¨

πŸ“¦ where this page comes from