---
name: "HTML::FormFu::Constraint::DependOn"
section: "3pm"
platform: "linux"
package: "libhtml-formfu-perl"
version: "2.07000-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/HTML::FormFu::Constraint::DependOn"
---

# HTML::FormFu::Constraint::DependOn(3pm)

Multi-field Dependency Constraint

## NAME

HTML::FormFu::Constraint::DependOn - Multi-field Dependency Constraint

## VERSION

version 2.07

## SYNOPSIS

```
    type: DependOn
    name: foo
    others: bar
```

## DESCRIPTION

If a value is submitted for the field this constraint is attached to, then a value must also be submitted for all fields named in "others" in HTML::FormFu::Role::Constraint::Others.

By default, if any of the named fields in "others" in HTML::FormFu::Role::Constraint::Others are missing, an error will be attached to each missing field. This behaviour can be changed by setting any of "attach\_errors\_to\_base" in HTML::FormFu::Role::Constraint::Others, "attach\_errors\_to\_others" in HTML::FormFu::Role::Constraint::Others or "attach\_errors\_to" in HTML::FormFu::Role::Constraint::Others.

This constraint doesn't honour the `not()` value.

## SEE ALSO

Is a sub-class of, and inherits methods from HTML::FormFu::Role::Constraint::Others, HTML::FormFu::Constraint

HTML::FormFu

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

## AUTHOR

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.
