Fix to avoid JS validation of fields hidden by "show on select"

Patch by Al Johnson.
This fixes validation of fields with input type "regexp" - and there may
be other cases as well - that currently get validated even if they're in
a div that's hidden by "show on select".

Bug: 58077
Change-Id: I98fbc60e7cda6f3efc42007eb37560d931d4e13c