In my form I have some fields, that should be validated depending on some field(-s) in another sub-fieldset of the Form
:
MyForm
- [fieldset] main instanceof WhatEverFieldset
-- [fieldset] foo instanceof FooFieldset
--- [field] field_a
--- [field] field_b
-- [fieldset] bar instanceof BarFieldset
--- [field] field_c
--- [fieldset] xyz instanceof XyzFieldset
---- [field] field_d
-- [fieldset] buz instanceof BuzFieldset
---- [field] field_e
--- [fieldset] xyz instanceof XyzFieldset
---- [field] field_d
So there are some validation rules to implement, that effect the fields of multiple fieldsets. E.g.:
At least
form.main.*.xyz.field_d
has to be set. That means, I cannot define arequired
rule directly in theXyzFieldset
, since there is a a condition and it for it's located outside of theXyzFieldset
.The value of
form.main.foo.field_a
has to begrater than
the value ofform.main.bar.field_c
.
Where / How to define validation rules, that depend on fields' values of other sub-fieldsets of the form?