Tag: selector validation in JavaScript