HTML5 adds a new attribute, required
. See here for more details.
This will not solve your problem, because it is defined for only one specific field and does not check cross-fields.
<input id='intput1' type='text' required='required' /> <input id='intput2' type='text' required='required' />
If you want a more flexible way to test this, I suggest adding JScript for this.
source share