There is already a validator for this. Note that there seems to be something
wrong with the docs for the form validator (the parser is breaking on
something), so I can't easily link to it, but you can read about it on
github's parsed version:

https://github.com/mootools/mootools-more/blob/master/Docs/Forms/Form.Validator.md

Search for validate-one-required

If that doesn't suit your needs, write your own custom validator; they're
pretty easy to write.

On Sat, Aug 13, 2011 at 4:33 AM, Olivier Girardot <[email protected]> wrote:

> Hi everyone,
> i'm using the Form.Validator.Inline greatly for my forms, but now i need to
> specify a validation condition for two fields like "at least one is
> required",
> i didn't find anything in the documentation, as it seems that validation
> using class attributes is only on a per-field basis.
> Is there any way to do it using Form.Validator.Inline ?
> Thanks everyone,
>
> Regards.
> Olivier.
>

Reply via email to