<form>
<input name="foo" id="foo">
<input name="bar" id="bar" requiredwith="foo,baz">
<input name="baz" id="baz">
</form>
Simply add a comma separated list of ids of inputs.
Hooks into native required support, so as is, it won't display a more specialised error message than the default required one.
Not tested on funky value inputs like date or time