HTML::...pendOn(3pm)

πŸ“¦
version 2.07000 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

HTML::FormFu::Constraint::DependOn β€” the Multi-field Dependency Constraint, bestie. It's giving "you can't have one without the other." ✨


🌸 VERSION 🌸

version 2.07 β€” she's grown, she's evolved πŸ’…


✨ SYNOPSIS ✨

type: DependOn
name: foo
others: bar

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ“ β€” if a value gets submitted for the field this constraint is attached to, then a value must also be submitted for all the fields named in others over in HTML::FormFu::Role::Constraint::Others. like, they're a package deal. no solo acts. πŸ‘‘

By default, if any of the named fields in others (again, that's HTML::FormFu::Role::Constraint::Others, iykyk) are missing, an error gets attached to each missing field. so everybody who didn't show up gets called out individually 😭. but don't worry, you can switch that up β€” just set any of attach_errors_to_base, attach_errors_to_others, or attach_errors_to in HTML::FormFu::Role::Constraint::Others and the behaviour changes. your call, your rules πŸ’…

🚨 heads up bestie: this constraint doesn't honour the not() value. not me being dramatic, it's literally just not a thing here. periodt.

πŸ’œ SEE ALSO πŸ’œ

  • She's a sub-class of, and inherits methods from, HTML::FormFu::Role::Constraint::Others and HTML::FormFu::Constraint 🧬 β€” the family tree is immaculate
  • HTML::FormFu β€” the mothership 🌈

πŸŽ€ AUTHOR πŸŽ€

Carl Franks cfranks@cpan.org


πŸ“œ LICENSE πŸ“œ

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. slay πŸ’–


πŸŽ€ AUTHOR (yes, again, iconic of her) πŸŽ€

Carl Franks <cpan@fireartist.com>


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 vibe, bestie 🫢 this page is HTML::...pendOn(3pm) β€” yes the manual name got chopped, she's mysterious like that 🧚 β€” brought to you by perl v5.28.1, dated 2019-01-12, and it ATE. no cap. go forth and constrain those dependent fields πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from