JavaScript-based validator for Universal Variable