HTML::...Fields(3pm)
π¦ HTML::FormFu::Constraint::MinMaxFields β the manual, but make it make sense
okay bestie, you found the perl docs for HTML::FormFu::Constraint::MinMaxFields, which lives in the User Contributed Perl Documentation section of the manual (that's the (3pm) situation, iykyk). It's a Min/Max Multi-field Constraint, and honestly? it's giving "count your friends and make sure you have enough but not too many." Let's go. π
β¨ VERSION β¨
version 2.07 β yes, that's the one, no cap.
β¨ SYNOPSIS β¨
type: MinMaxFields
name: foo
others: [bar, baz]
min: 1
max: 1
that's the whole vibe right there. foo is your main character, bar and baz are the supporting cast, and you're telling the form "hey, between 1 and 1 of these should actually be filled in." periodt. π
β¨ DESCRIPTION β¨
So what does this thing actually do? It makes sure that at least a minimum number of fields are present, and only a maximum number of fields are present. Like a bouncer for your form. πͺ
β οΈ important lore: this constraint doesn't honour the not() value. So if you were hoping to flip it, uh, no. It said no. π
β¨ METHODS β¨
minimum / min πΈ
The minimum number of named fields which must be filled in.
min is an alias for minimum. two names, one job, we love an efficient icon. π
maximum / max π₯
The maximum number of named fields which must be filled in.
max is an alias for maximum.
And the default for max? It's the number of all affected fields β in other words, one more than the number of elements given to others. so if you don't set it, it's basically like "sure babe, all of them, go off." β¨
attach_errors_to_base π
Default Value: 1
attach_errors_to_others π«Ά
Default Value: 0
β¨ SEE ALSO β¨
This bad boy is a sub-class of, and inherits methods from:
HTML::FormFu::Role::Constraint::OthersHTML::FormFu::Constraint
Also peep HTML::FormFu while you're at it, bestie.
β¨ AUTHOR β¨
Mario Minati "mario.minati@googlemail.com" β legend behaviour. π
β¨ LICENSE β¨
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. (slay, open source rights π)
β¨ AUTHOR β¨ (yes, again β it's in the original, don't come for me π)
Carl Franks <cpan@fireartist.com>
β¨ COPYRIGHT AND LICENSE β¨
This software is copyright (c) 2018 by Carl Franks.
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 little doc came to you courtesy of perl v5.28.1, dated 2019-01-12, and it's filed under HTML::...Fields(3pm) in the manual. go forth and validate those multi-field forms, you absolute icon. ππ
π¦ where this page comes from
- debian bookworm: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formfu-perl 2.07000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms