Badger...Length(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute

πŸ’… Badger::Data::Facet::Text::MaxLength ✨

okay bestie, so this is a page from the User Contributed Perl Documentation β€” it's Badger::Data::Facet::Text::MaxLength(3pm), and yes the header line gets truncated to Badger...Length(3pm) like it's shy or something. Anyway. Let's get into it 🫢


🌸 NAME 🌸

Badger::Data::Facet::Text::MaxLength β€” a validation facet for text length, no cap πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

So this module implements a validation facet that checks the length of a text value, and it asserts that the length is less than or equal to a pre-defined length. That's it. That's the whole vibe. It's giving "your string cannot be longer than this, periodt" πŸ‘‘


✨ METHODS ✨

This module implements the following method in addition to those it inherits from the Badger::Data::Facet::Text, Badger::Data::Facet and Badger::Base base classes. So like, it's got its own thing going on but it's also standing on the shoulders of its ancestors, iconic behavior fr fr πŸ’€

πŸŽ€ validate($text_ref, $type)

This method validates that the length (i.e. the number of characters) of the text passed by reference as the first argument is less than or equal to the pre-defined maximum limit.

That's the whole method. $text_ref in, vibe check out. If it's too long, it does not slay. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Andy Wardley <http://wardley.org/> β€” king behavior, respectfully 🫑


Copyright (C) 2001-2012 Andy Wardley. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. open source bestie rights, we love to see it πŸ’–


⭐ SEE ALSO ⭐

  • Badger::Base
  • Badger::Data::Facet
  • Badger::Data::Facet::Text

go read those next, iykyk πŸ“šβœ¨


and that's the whole page bestie!! this was documented by the User Contributed Perl Documentation crew running on perl v5.36.0, dated 2023-08-28 πŸ“ mwah, go validate some text lengths, ily πŸ’œ

πŸ“¦ where this page comes from