core: reintroduce toggleVisibility for jQuery
core: don't verify input regexp if no value in it