Badger...:Length(3pm)

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

✨ NAME ✨

ok so this is Badger::Data::Facet::Text::Length β€” she's a validation facet for text length, and she's also filed under the manual name Badger...:Length(3pm) in case you were out here searching for her under a nickname πŸ’…


🌸 DESCRIPTION 🌸

bestie. listen. this module is literally here to do ONE thing and she does it flawlessly πŸŽ€

She implements a validation facet β€” yes, a facet, that's the actual deal β€” that checks the length of a text value to assert that it is equal to a pre-defined length. that's it. that's the whole vibe. if the number of characters doesn't match the number she was told to expect? not slaying. not passing. πŸ’€

pre-defined length. she's not out here guessing. she KNOWS what she wants and she's holding your text to that standard. main character energy fr fr ✨


πŸ’– METHODS πŸ’–

This module implements the following method in addition to those inherited from the Badger::Data::Facet::Text, Badger::Data::Facet and Badger::Base base classes. so yeah she's got a whole family tree and she's inheriting from all of them, iconic lineage honestly πŸ‘‘

πŸ¦‹ validate($text_ref, $type)

This method validates that the length (i.e. number of characters, literally counting them one by one 🧚) of the text passed by reference as the first argument equals the pre-defined length.

so like β€” text comes in by reference as the first argument, the pre-defined length is sitting there waiting, and validate is the vibe check that decides if they match. equal? slay. not equal? the validation does not pass, no cap 😭


πŸ‘‘ AUTHOR πŸ‘‘

Andy Wardley <http://wardley.org/>


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. 🫢


⭐ SEE ALSO ⭐

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

and that's the whole page bestie!! πŸŽ€ this one's running on perl v5.36.0, dated 2023-08-28, so go forth and validate those lengths, you absolute icon πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from