Valida...adonly(3pm)

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

πŸ’– Validation::Class::Directive::Readonly β€” the 3pm manual page, bestie edition πŸ’–

Okay so real quick, before we even get into it: this is the manual page for Validation::Class::Directive::Readonly, and yes it lives in section 3pm of your man pages (that's the Perl module section, iykyk). Sit down, hydrate, let's go ✨


🌸 NAME 🌸

Validation::Class::Directive::Readonly β€” the Readonly Directive for Validation Class Field Definitions. That's the whole vibe. She's a directive, she handles "readonly", and she does it flawlessly πŸ’…


πŸŽ€ VERSION πŸŽ€

version 7.900059 β€” that's the one, don't @ me, that's literally what it says πŸ‘‘


✨ SYNOPSIS ✨

Here's the little demo, copied exactly so you can just paste it and go 🫢

use Validation::Class::Simple;

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

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

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

So like β€” you spin up your Validation::Class::Simple object, you tell it about a field called task_completed, and you mark it readonly => 1. Then you load up your params, you call validate, and if it comes back false you go deal with the failures. That's the whole flow, no notes πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

So Validation::Class::Directive::Readonly is a core validation class field directive. And what does a readonly directive actually do, you ask? The way that it determines whether the associated parameters should be ignored. That's it. That's her job. Iconic behaviour honestly 😌


🌈 AUTHOR 🌈

Al Newkirk <anewkirk@ana.io> β€” the legend who wrote her πŸ’œ


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 wild, but respectfully 🌸


Bestie note: the man page itself was rendered by perl v5.36.0, dated 2023-06-11 β€” that's your footer, that's your timestamp, and honestly? A little nostalgic, a little iconic πŸŽ€βœ¨

mwah, go validate something πŸ’…

πŸ“¦ where this page comes from