Valida...ltering(3pm)

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

πŸ’– Validation::Class::Directive::Filtering πŸ’–

okay so bestie, you're looking at the manual page for Validation::Class::Directive::Filtering, which is part of the User Contributed Perl Documentation (the 3pm situation, iykyk 🫢). It's the Filtering Directive for Validation Class Field Definitions, and honestly? it's giving "quietly essential" energy. no cap.


✨ VERSION ✨

version 7.900059 🌸 β€” that's the one, don't let anyone tell you otherwise.


πŸ¦‹ SYNOPSIS πŸ¦‹

ok so here's the vibe in code form, literally exactly as written:

use Validation::Class::Simple;

my $rules = Validation::Class::Simple->new(
    fields => {
        telephone_number => {
            filters   => ['numeric']
            filtering => 'post'
        }
    }
);

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

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

step one: you pull in Validation::Class::Simple. step two: you make your $rules object and declare a fields entry β€” here it's telephone_number, with filters => ['numeric'] and filtering => 'post'. step three: you shove your $parameters into $rules->params->add(...). step four: you call $rules->validate, and if it comes back false, you go handle the failures like the responsible main character you are. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

Validation::Class::Directive::Filtering is a core validation class field directive, and what it does is specify whether filtering and sanitation should happen as a pre-process or a post-process. that's the whole job. it's the little timing switch for when your filters get to do their thing, and it eats. πŸ”₯


πŸŽ€ AUTHOR πŸŽ€

Al Newkirk <anewkirk@ana.io> β€” king behavior, we love him for it πŸ‘‘


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 yes, go forth, remix, redistribute, slay.


and that's the page, bestie πŸ’œ it's the perl v5.36.0 era, dated 2023-06-11, and yes, that little truncated title up top really is Valida...ltering β€” she got cut off mid-glow-up and we still stan her. bye bye, go validate something πŸ¦‹βœ¨

πŸ“¦ where this page comes from