one-validation
Advanced tools
Comparing version 0.2.15 to 0.2.16
@@ -14,3 +14,3 @@ { | ||
"description": "Regexp based validation collection for common internet validation tasks", | ||
"version": "0.2.15", | ||
"version": "0.2.16", | ||
"repository": { | ||
@@ -17,0 +17,0 @@ "url": "git://github.com/One-com/one-validation.git" |
@@ -12,2 +12,6 @@ one-validation | ||
Package managers: | ||
* npm: `npm install one-validation` | ||
* bower: `bower install validation` | ||
Supported patterns | ||
@@ -14,0 +18,0 @@ ================== |
@@ -56,2 +56,3 @@ var vows = require('vows'), | ||
'http://a.b-c.de', | ||
'http://www.hitta.se/karta#tool=coordinate&vkid=dWR_Xnqbbk¢er=6411726:1290882&zl=9&type=map&bounds=6411510:1290540,6411943:1291224', | ||
/* | ||
@@ -58,0 +59,0 @@ // Unicode in url? |
// THIS FILE IS AUTOGENERATED! See lib/validation.js.tpl | ||
/*global module, window, define*/ | ||
(function () { | ||
(function (root, factory) { | ||
if (typeof exports === 'object') { | ||
module.exports = factory(); | ||
} else if (typeof define === 'function' && define.amd) { | ||
define(factory); | ||
} else { | ||
root.one = root.one || {}; | ||
root.one.validation = factory(); | ||
} | ||
}(this, function () { | ||
"use strict"; | ||
@@ -13,4 +22,5 @@ | ||
function concatRegExps() { // ... | ||
var source = ''; | ||
for (var i = 0 ; i < arguments.length ; i += 1) { | ||
var source = '', | ||
i = 0; | ||
for (; i < arguments.length; i += 1) { | ||
if (Object.prototype.toString.call(arguments[i]) === '[object RegExp]') { | ||
@@ -30,3 +40,3 @@ source += arguments[i].source; | ||
fragments = { | ||
tld: /(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i, // See /lib/tld.js | ||
tld: /(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|mgbx4cd0ab|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|مليسيا|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i, // See /lib/tld.js | ||
domainPart: /[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?/i, | ||
@@ -40,5 +50,5 @@ port: /\d{1,5}/, | ||
password: /[^@\/]+?/i, | ||
pathname: /[\w%+@*\-\.\/\(\)&=;~]*/, | ||
search: /[\w%+@*\-\.\/\(\)&=;\?~]*/, | ||
hash: /[\w%+@*\-\.\/\(\)&=;\?#~]*/, | ||
pathname: /[\w\-\.~%!$&'\(\)*+,;=:@\/]*/, | ||
search: /[\w\-\.~%!$&'\(\)*+,;=:@\/?]*/, | ||
hash: /[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*/, | ||
ipv4: new RegExp('(?:' + ipv4DigitRegExpSource + '\\.){3}' + ipv4DigitRegExpSource) | ||
@@ -103,19 +113,4 @@ }, | ||
// CommonJS module | ||
if (typeof module !== 'undefined') { | ||
module.exports = validation; | ||
} else { | ||
// Assume browser | ||
if (typeof define === 'function') { | ||
// Assume require.js, expose AMD module | ||
define([], function () { | ||
return validation; | ||
}); | ||
} else { | ||
window.one = window.one || {}; | ||
window.one.validation = validation; | ||
} | ||
} | ||
return validation; | ||
})); | ||
}()); | ||
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";function e(){var e="";for(var t=0;t<arguments.length;t+=1)Object.prototype.toString.call(arguments[t])==="[object RegExp]"?e+=arguments[t].source:e+=arguments[t];return e}function s(t){return new RegExp(e(t,"://","(?:",r.user,"(?::",r.password,")?@",")?","(?:",r.subdomain,"|",r.ipv4,")","(?::",r.port,")?",r.pathnameSearchHash),"i")}var t=/([0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])/.source,n={functions:{}},r={tld:/(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i,domainPart:/[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?/i,port:/\d{1,5}/,localpart:/[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*/i,user:/[^:@\/]+/i,uuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i,lowerCaseUuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,upperCaseUuid:/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/,password:/[^@\/]+?/i,pathname:/[\w%+@*\-\.\/\(\)&=;~]*/,search:/[\w%+@*\-\.\/\(\)&=;\?~]*/,hash:/[\w%+@*\-\.\/\(\)&=;\?#~]*/,ipv4:new RegExp("(?:"+t+"\\.){3}"+t)},i;r.domain=new RegExp(r.domainPart.source+"\\."+r.tld.source,"i"),r.subdomain=new RegExp("(?:"+r.domainPart.source+"\\.)*"+r.domain.source,"i"),r.email=new RegExp(r.localpart.source+"@"+r.subdomain.source,"i"),r.mailtoUrl=new RegExp("mailto:"+r.email.source,"i"),r.pathnameSearchHash=new RegExp(e("(?:/",r.pathname,"(?:\\?",r.search,")?","(?:#",r.hash,")?",")?")),r.httpUrl=s(/https?/),r.ftpUrl=s(/ftp/),r.url=r.httpUrl;for(i in r)r.hasOwnProperty(i)&&(n[i]=new RegExp("^"+r[i].source+"$","i"),n.functions[i]=function(e){return function(t){return n[e].test(t)}}(i));n.fragments=r,typeof module!="undefined"?module.exports=n:typeof define=="function"?define([],function(){return n}):(window.one=window.one||{},window.one.validation=n)})(); | ||
(function(e,t){typeof exports=="object"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e.one=e.one||{},e.one.validation=t())})(this,function(){"use strict";function e(){var e="",t=0;for(;t<arguments.length;t+=1)Object.prototype.toString.call(arguments[t])==="[object RegExp]"?e+=arguments[t].source:e+=arguments[t];return e}function s(t){return new RegExp(e(t,"://","(?:",r.user,"(?::",r.password,")?@",")?","(?:",r.subdomain,"|",r.ipv4,")","(?::",r.port,")?",r.pathnameSearchHash),"i")}var t=/([0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])/.source,n={functions:{}},r={tld:/(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|mgbx4cd0ab|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|مليسيا|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i,domainPart:/[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?/i,port:/\d{1,5}/,localpart:/[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*/i,user:/[^:@\/]+/i,uuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i,lowerCaseUuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,upperCaseUuid:/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/,password:/[^@\/]+?/i,pathname:/[\w\-\.~%!$&'\(\)*+,;=:@\/]*/,search:/[\w\-\.~%!$&'\(\)*+,;=:@\/?]*/,hash:/[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*/,ipv4:new RegExp("(?:"+t+"\\.){3}"+t)},i;r.domain=new RegExp(r.domainPart.source+"\\."+r.tld.source,"i"),r.subdomain=new RegExp("(?:"+r.domainPart.source+"\\.)*"+r.domain.source,"i"),r.email=new RegExp(r.localpart.source+"@"+r.subdomain.source,"i"),r.mailtoUrl=new RegExp("mailto:"+r.email.source,"i"),r.pathnameSearchHash=new RegExp(e("(?:/",r.pathname,"(?:\\?",r.search,")?","(?:#",r.hash,")?",")?")),r.httpUrl=s(/https?/),r.ftpUrl=s(/ftp/),r.url=r.httpUrl;for(i in r)r.hasOwnProperty(i)&&(n[i]=new RegExp("^"+r[i].source+"$","i"),n.functions[i]=function(e){return function(t){return n[e].test(t)}}(i));return n.fragments=r,n}); |
Sorry, the diff of this file is not supported yet
22382
12
284
29