// File: validate_toplevel_domain.js
// Requires: validate.js
// Usage: Validates URL fields for top-level domains only
Validation.add('validate-top-level-domain', 'Only top level domains are allowed', function (v) {
     return Validation.get('IsEmpty').test(v) || /^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)\/?$/i.test(v)

});

