HTML::...::Text(3pm)

πŸ“¦
version 0.40068 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute

πŸ¦‹ HTML::...::Text(3pm) πŸ¦‹

Okay bestie, this is the User Contributed Perl Documentation page for HTML::...::Text(3pm), and the manual name you’re looking for is HTML::FormHandler::Field::Text β€” the text field. Let’s go. πŸ’–

✨ NAME ✨

HTML::FormHandler::Field::Text β€” text field. That’s the whole name, and it’s giving simple text entry field energy. πŸŽ€

🌟 VERSION 🌟

version 0.40068 β€” that’s the version number, kept exactly as-is. πŸ’…

πŸŽ€ DESCRIPTION πŸŽ€

This is a simple text entry field. Widget type is 'text'. That’s the vibe: text field, no extra drama. ✨

πŸ’– METHODS πŸ’–

size [integer] πŸŽ€

This one gets used when the HTML is constructed. It determines the size of the input field.

Big important note: the 'maxlength' field should be used as a constraint on the size of the field, not this attribute. Don’t mix those up, bestie. πŸ™ˆ

minlength [integer] 🌸

This integer value, if it’s non-zero, defines the minimum number of characters that must be entered. So if it’s non-zero, it’s the minimum character count, periodt. ✨

maxlength [integer] πŸ¦‹

A constraint on the maximum length of the text. It’s the cap on how long the text can get. πŸ”₯

error messages πŸ“

Set error messages (text_minlength, text_maxlength):

           has_field 'my_text' => ( type => 'Text', messages =>
               {  'text_minlength' => 'Field is too short',
                  'text_maxlength' => 'Field is too long',
               } );

Those two message keys are text_minlength and text_maxlength, and the example above is exactly how you set them. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

FormHandler Contributors - see HTML::FormHandler. Shoutout to the whole squad. 🫢

This software is copyright (c) 2017 by Gerda Shank.

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: HTML::...::Text(3pm) from the User Contributed Perl Documentation crew, perl v5.34.0, dated 2022-03-25. Bye and slay! πŸ’…βœ¨
πŸ“¦ where this page comes from