Valida...::Time(3pm)

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

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

okay bestie, welcome to the Validation::Class::Directive::Time page β€” it's the Time Directive for Validation Class Field Definitions, and honestly? it's giving reliable. it's giving "i just check times and i do it well." πŸ•βœ¨


✨ VERSION ✨

version 7.900059 πŸŽ€


🌸 SYNOPSIS 🌸

here's the vibe, copy-paste ready:

use Validation::Class::Simple;

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

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

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

so you spin up your rules, you slap time => 1 on a field (in this case creation_time πŸ•°οΈ), you feed it your params, and then you validate. if it comes back false β€” that's your cue to handle the failures. no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

Validation::Class::Directive::Time is a core validation class field directive that handles validation for standard time formats. it's the little bouncer at the door of your time fields, checking ids and everything πŸ’…

this directive respects the following time formats, periodt:

  • 24hr β€” written as HH:MM
  • am/pm β€” written as [H]H:MM[a|p]m
⚠️ heads up bestie: it does not validate seconds. like, at all. seconds are simply not invited to this party πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Al Newkirk <anewkirk@ana.io> β€” the icon who made 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. 🌈


and that's the whole page, bestie!! this lil doc came to you as perl v5.36.0, dated 2023-06-11 β€” she's a classic and she knows it πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from