skyframe 0.0.1.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/skyframe.rb +8 -0
- data/lib/skyframe/version.rb +3 -0
- data/stylesheets/_main.scss +1 -0
- data/templates/project/files/404.html +157 -0
- data/templates/project/files/CHANGELOG.md +19 -0
- data/templates/project/files/about.html +96 -0
- data/templates/project/files/apple-touch-icon-114x114-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon-144x144-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon-57x57-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon-72x72-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon-precomposed.png +0 -0
- data/templates/project/files/apple-touch-icon.png +0 -0
- data/templates/project/files/bg_direction_nav.png +0 -0
- data/templates/project/files/blog-details.html +255 -0
- data/templates/project/files/blog.html +157 -0
- data/templates/project/files/config.rb +28 -0
- data/templates/project/files/contact.html +158 -0
- data/templates/project/files/crossdomain.xml +15 -0
- data/templates/project/files/dummy-full.png +0 -0
- data/templates/project/files/dummy-square.png +0 -0
- data/templates/project/files/favicon.ico +0 -0
- data/templates/project/files/flash/video-js.swf +0 -0
- data/templates/project/files/forgot-password.html +101 -0
- data/templates/project/files/htaccess.txt +536 -0
- data/templates/project/files/humans.txt +18 -0
- data/templates/project/files/icon-gmap.png +0 -0
- data/templates/project/files/icon-search.png +0 -0
- data/templates/project/files/inc/breadcrumb.html +5 -0
- data/templates/project/files/inc/footer.html +37 -0
- data/templates/project/files/inc/header.html +20 -0
- data/templates/project/files/inc/js-bottom.html +21 -0
- data/templates/project/files/inc/js-top.html +10 -0
- data/templates/project/files/inc/main-nav.html +7 -0
- data/templates/project/files/logo.png +0 -0
- data/templates/project/files/logo@2x.png +0 -0
- data/templates/project/files/media/audio/dummy-audio.mp3 +0 -0
- data/templates/project/files/media/video/dummy-video.mp4 +0 -0
- data/templates/project/files/products.html +100 -0
- data/templates/project/files/readme.md +55 -0
- data/templates/project/files/robots.txt +3 -0
- data/templates/project/files/services.html +75 -0
- data/templates/project/files/sign-in.html +104 -0
- data/templates/project/files/sitemap.html +102 -0
- data/templates/project/files/video-js.png +0 -0
- data/templates/project/javascripts/libs/jquery-1.8.0.min.js +2 -0
- data/templates/project/javascripts/libs/jquery.validationEngine.js +1819 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-cz.js +156 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-da.js +135 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-de.js +139 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-en.js +192 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-es.js +137 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-et.js +139 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-fa.js +181 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-fi.js +111 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-fr.js +129 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-hr.js +177 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-hu.js +179 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-it.js +111 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-ja.js +149 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-nl.js +136 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-pl.js +140 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-pt.js +135 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-pt_BR.js +127 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-ro.js +177 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-ru.js +136 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-se.js +153 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-tr.js +156 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-vi.js +179 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-zh_CN.js +177 -0
- data/templates/project/javascripts/libs/languages/jquery.validationEngine-zh_TW.js +177 -0
- data/templates/project/javascripts/libs/modernizr-2.5.3.min.js +4 -0
- data/templates/project/javascripts/libs/respond.min.js +6 -0
- data/templates/project/javascripts/libs/selectivizr.js +560 -0
- data/templates/project/javascripts/plugins.js +83 -0
- data/templates/project/javascripts/script.js +282 -0
- data/templates/project/manifest.rb +136 -0
- data/templates/project/partials/_debug.scss +114 -0
- data/templates/project/partials/_functions.scss +10 -0
- data/templates/project/partials/_helpers.scss +86 -0
- data/templates/project/partials/_layout.scss +188 -0
- data/templates/project/partials/_media.scss +191 -0
- data/templates/project/partials/_misc.scss +103 -0
- data/templates/project/partials/_mixins.scss +140 -0
- data/templates/project/partials/_mods.scss +59 -0
- data/templates/project/partials/_normalize.scss +36 -0
- data/templates/project/partials/_print.scss +80 -0
- data/templates/project/partials/_type.scss +331 -0
- data/templates/project/partials/_vars.scss +114 -0
- data/templates/project/partials/mods/_mod-block.scss +96 -0
- data/templates/project/partials/mods/_mod-breadcrumb.scss +103 -0
- data/templates/project/partials/mods/_mod-carousel.scss +108 -0
- data/templates/project/partials/mods/_mod-footer.scss +199 -0
- data/templates/project/partials/mods/_mod-form.scss +319 -0
- data/templates/project/partials/mods/_mod-header.scss +291 -0
- data/templates/project/partials/mods/_mod-intro.scss +98 -0
- data/templates/project/partials/mods/_mod-layouts.scss +135 -0
- data/templates/project/partials/mods/_mod-main-nav.scss +143 -0
- data/templates/project/partials/mods/_mod-map.scss +107 -0
- data/templates/project/partials/mods/_mod-msg.scss +119 -0
- data/templates/project/partials/mods/_mod-paging.scss +101 -0
- data/templates/project/partials/mods/_mod-sitemap.scss +132 -0
- data/templates/project/partials/mods/_mod-split-form.scss +98 -0
- data/templates/project/partials/mods/_mod-strip.scss +118 -0
- data/templates/project/partials/mods/_mod-table.scss +118 -0
- data/templates/project/partials/mods/_mod-widget.scss +103 -0
- data/templates/project/partials/plugins/_flexslider.scss +82 -0
- data/templates/project/partials/plugins/_validation-engine.scss +137 -0
- data/templates/project/partials/plugins/_video-js.scss +616 -0
- data/templates/project/partials/sass-template.scss +103 -0
- data/templates/project/screen.scss +2 -0
- metadata +220 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
(function($){
|
2
|
+
$.fn.validationEngineLanguage = function(){
|
3
|
+
};
|
4
|
+
$.validationEngineLanguage = {
|
5
|
+
newLang: function(){
|
6
|
+
$.validationEngineLanguage.allRules = {
|
7
|
+
"required": { // Add your regex rules here, you can take telephone as an example
|
8
|
+
"regex": "none",
|
9
|
+
"alertText": "* Kenttä on pakollinen",
|
10
|
+
"alertTextCheckboxMultiple": "* Yksi valikoima, kiitos",
|
11
|
+
"alertTextCheckboxe": "* Tarkistusmerkki on pakollinen"
|
12
|
+
},
|
13
|
+
"requiredInFunction": {
|
14
|
+
"func": function(field, rules, i, options){
|
15
|
+
return (field.val() == "test") ? true : false;
|
16
|
+
},
|
17
|
+
"alertText": "* Field must equal test"
|
18
|
+
},
|
19
|
+
"minSize": {
|
20
|
+
"regex": "none",
|
21
|
+
"alertText": "* Vähintään ",
|
22
|
+
"alertText2": " merkkiä sallittu"
|
23
|
+
},
|
24
|
+
"maxSize": {
|
25
|
+
"regex": "none",
|
26
|
+
"alertText": "* Enintään ",
|
27
|
+
"alertText2": " merkkiä sallittu"
|
28
|
+
},
|
29
|
+
"min": {
|
30
|
+
"regex": "none",
|
31
|
+
"alertText": "* Vähittäisluku on "
|
32
|
+
},
|
33
|
+
"max": {
|
34
|
+
"regex": "none",
|
35
|
+
"alertText": "* Enimmäisluku on "
|
36
|
+
},
|
37
|
+
"past": {
|
38
|
+
"regex": "none",
|
39
|
+
"alertText": "* Päivämäärä ennen "
|
40
|
+
},
|
41
|
+
"future": {
|
42
|
+
"regex": "none",
|
43
|
+
"alertText": "* Päivämäärä jälkeen "
|
44
|
+
},
|
45
|
+
"maxCheckbox": {
|
46
|
+
"regex": "none",
|
47
|
+
"alertText": "* Enintään ",
|
48
|
+
"alertText2": " valikoimaa sallittu"
|
49
|
+
},
|
50
|
+
"minCheckbox": {
|
51
|
+
"regex": "none",
|
52
|
+
"alertText": "* Valitse ",
|
53
|
+
"alertText2": " valikoima(a)"
|
54
|
+
},
|
55
|
+
"equals": {
|
56
|
+
"regex": "none",
|
57
|
+
"alertText": "* Kentät eivät täsmää"
|
58
|
+
},
|
59
|
+
"creditCard": {
|
60
|
+
"regex": "none",
|
61
|
+
"alertText": "* Luottokortin numero ei kelpaa"
|
62
|
+
},
|
63
|
+
"phone": {
|
64
|
+
// credit: jquery.h5validate.js / orefalo
|
65
|
+
"regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
|
66
|
+
"alertText": "* Viallinen puhelinnumero"
|
67
|
+
},
|
68
|
+
"email": {
|
69
|
+
// Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
|
70
|
+
"regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
|
71
|
+
"alertText": "* Viallinen sähköpostiosoite"
|
72
|
+
},
|
73
|
+
"integer": {
|
74
|
+
"regex": /^[\-\+]?\d+$/,
|
75
|
+
"alertText": "* Sopimaton numero"
|
76
|
+
},
|
77
|
+
"number": {
|
78
|
+
// Number, including positive, negative, and floating decimal. credit: orefalo
|
79
|
+
"regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
|
80
|
+
"alertText": "* Viallinen luku"
|
81
|
+
},
|
82
|
+
"date": {
|
83
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
|
84
|
+
"alertText": "* Viallinen päivämäärä. Päivämäärän täytyy olla VVVV-KK-PP muodossa"
|
85
|
+
},
|
86
|
+
"ipv4": {
|
87
|
+
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
|
88
|
+
"alertText": "* Viallinen IP-osoite"
|
89
|
+
},
|
90
|
+
"url": {
|
91
|
+
"regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
|
92
|
+
"alertText": "* Viallinen URL"
|
93
|
+
},
|
94
|
+
"onlyNumberSp": {
|
95
|
+
"regex": /^[0-9\ ]+$/,
|
96
|
+
"alertText": "* Ainostaan numeroin"
|
97
|
+
},
|
98
|
+
"onlyLetterSp": {
|
99
|
+
"regex": /^[a-zA-Z\ \']+$/,
|
100
|
+
"alertText": "* Ainoastaan kirjaimin"
|
101
|
+
},
|
102
|
+
"onlyLetterNumber": {
|
103
|
+
"regex": /^[0-9a-zA-Z]+$/,
|
104
|
+
"alertText": "* Erikoismerkit eivät ole sallittuja"
|
105
|
+
}
|
106
|
+
};
|
107
|
+
|
108
|
+
}
|
109
|
+
};
|
110
|
+
$.validationEngineLanguage.newLang();
|
111
|
+
})(jQuery);
|
@@ -0,0 +1,129 @@
|
|
1
|
+
(function($){
|
2
|
+
$.fn.validationEngineLanguage = function(){
|
3
|
+
};
|
4
|
+
$.validationEngineLanguage = {
|
5
|
+
newLang: function(){
|
6
|
+
$.validationEngineLanguage.allRules = {
|
7
|
+
"required": {
|
8
|
+
"regex": "none",
|
9
|
+
"alertText": "* Ce champ est requis",
|
10
|
+
"alertTextCheckboxMultiple": "* Choisir une option",
|
11
|
+
"alertTextCheckboxe": "* Cette option est requise"
|
12
|
+
},
|
13
|
+
"requiredInFunction": {
|
14
|
+
"func": function(field, rules, i, options){
|
15
|
+
return (field.val() == "test") ? true : false;
|
16
|
+
},
|
17
|
+
"alertText": "* Field must equal test"
|
18
|
+
},
|
19
|
+
"minSize": {
|
20
|
+
"regex": "none",
|
21
|
+
"alertText": "* Minimum ",
|
22
|
+
"alertText2": " caractères requis"
|
23
|
+
},
|
24
|
+
"groupRequired": {
|
25
|
+
"regex": "none",
|
26
|
+
"alertText": "* Vous devez remplir un des champs suivant"
|
27
|
+
},
|
28
|
+
"maxSize": {
|
29
|
+
"regex": "none",
|
30
|
+
"alertText": "* Maximum ",
|
31
|
+
"alertText2": " caractères requis"
|
32
|
+
},
|
33
|
+
"min": {
|
34
|
+
"regex": "none",
|
35
|
+
"alertText": "* Valeur minimum requise "
|
36
|
+
},
|
37
|
+
"max": {
|
38
|
+
"regex": "none",
|
39
|
+
"alertText": "* Valeur maximum requise "
|
40
|
+
},
|
41
|
+
"past": {
|
42
|
+
"regex": "none",
|
43
|
+
"alertText": "* Date antérieure au "
|
44
|
+
},
|
45
|
+
"future": {
|
46
|
+
"regex": "none",
|
47
|
+
"alertText": "* Date postérieure au "
|
48
|
+
},
|
49
|
+
"maxCheckbox": {
|
50
|
+
"regex": "none",
|
51
|
+
"alertText": "* Nombre max de choix excédé"
|
52
|
+
},
|
53
|
+
"minCheckbox": {
|
54
|
+
"regex": "none",
|
55
|
+
"alertText": "* Veuillez choisir ",
|
56
|
+
"alertText2": " options"
|
57
|
+
},
|
58
|
+
"equals": {
|
59
|
+
"regex": "none",
|
60
|
+
"alertText": "* Votre champ n'est pas identique"
|
61
|
+
},
|
62
|
+
"creditCard": {
|
63
|
+
"regex": "none",
|
64
|
+
"alertText": "* Numéro de carte bancaire valide"
|
65
|
+
},
|
66
|
+
"phone": {
|
67
|
+
// credit: jquery.h5validate.js / orefalo
|
68
|
+
"regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
|
69
|
+
"alertText": "* Numéro de téléphone invalide"
|
70
|
+
},
|
71
|
+
"email": {
|
72
|
+
// Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
|
73
|
+
"regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
|
74
|
+
"alertText": "* Adresse email invalide"
|
75
|
+
},
|
76
|
+
"integer": {
|
77
|
+
"regex": /^[\-\+]?\d+$/,
|
78
|
+
"alertText": "* Nombre entier invalide"
|
79
|
+
},
|
80
|
+
"number": {
|
81
|
+
// Number, including positive, negative, and floating decimal. credit: orefalo
|
82
|
+
"regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
|
83
|
+
"alertText": "* Nombre flottant invalide"
|
84
|
+
},
|
85
|
+
"date": {
|
86
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
|
87
|
+
"alertText": "* Date invalide, format YYYY-MM-DD requis"
|
88
|
+
},
|
89
|
+
"ipv4": {
|
90
|
+
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
|
91
|
+
"alertText": "* Adresse IP invalide"
|
92
|
+
},
|
93
|
+
"url": {
|
94
|
+
"regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
|
95
|
+
"alertText": "* URL invalide"
|
96
|
+
},
|
97
|
+
"onlyNumberSp": {
|
98
|
+
"regex": /^[0-9\ ]+$/,
|
99
|
+
"alertText": "* Seuls les chiffres sont acceptés"
|
100
|
+
},
|
101
|
+
"onlyLetterSp": {
|
102
|
+
"regex": /^[a-zA-Z\u00C0-\u00D6\u00D9-\u00F6\u00F9-\u00FD\ \']+$/,
|
103
|
+
"alertText": "* Seules les lettres sont acceptées"
|
104
|
+
},
|
105
|
+
"onlyLetterNumber": {
|
106
|
+
"regex": /^[0-9a-zA-Z\u00C0-\u00D6\u00D9-\u00F6\u00F9-\u00FD]+$/,
|
107
|
+
"alertText": "* Aucun caractère spécial n'est accepté"
|
108
|
+
},
|
109
|
+
// --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
|
110
|
+
"ajaxUserCall": {
|
111
|
+
"url": "ajaxValidateFieldUser",
|
112
|
+
"extraData": "name=eric",
|
113
|
+
"alertTextLoad": "* Chargement, veuillez attendre",
|
114
|
+
"alertText": "* Ce nom est déjà pris"
|
115
|
+
},
|
116
|
+
"ajaxNameCall": {
|
117
|
+
"url": "ajaxValidateFieldName",
|
118
|
+
"alertText": "* Ce nom est déjà pris",
|
119
|
+
"alertTextOk": "*Ce nom est disponible",
|
120
|
+
"alertTextLoad": "* Chargement, veuillez attendre"
|
121
|
+
},
|
122
|
+
"validate2fields": {
|
123
|
+
"alertText": "Veuillez taper le mot HELLO"
|
124
|
+
}
|
125
|
+
};
|
126
|
+
}
|
127
|
+
};
|
128
|
+
$.validationEngineLanguage.newLang();
|
129
|
+
})(jQuery);
|
@@ -0,0 +1,177 @@
|
|
1
|
+
(function($){
|
2
|
+
$.fn.validationEngineLanguage = function(){
|
3
|
+
};
|
4
|
+
$.validationEngineLanguage = {
|
5
|
+
newLang: function(){
|
6
|
+
$.validationEngineLanguage.allRules = {
|
7
|
+
"required": { // Add your regex rules here, you can take telephone as an example
|
8
|
+
"regex": "none",
|
9
|
+
"alertText": "* Ovo polje je obavezno",
|
10
|
+
"alertTextCheckboxMultiple": "* Molimo odaberite opciju",
|
11
|
+
"alertTextCheckboxe": "* Ovaj odabir je obavezan",
|
12
|
+
"alertTextDateRange": "* Oba datuma su obavezna"
|
13
|
+
},
|
14
|
+
"requiredInFunction": {
|
15
|
+
"func": function(field, rules, i, options){
|
16
|
+
return (field.val() == "test") ? true : false;
|
17
|
+
},
|
18
|
+
"alertText": "* Field must equal test"
|
19
|
+
},
|
20
|
+
"dateRange": {
|
21
|
+
"regex": "none",
|
22
|
+
"alertText": "* Greška ",
|
23
|
+
"alertText2": "Raspon datuma"
|
24
|
+
},
|
25
|
+
"dateTimeRange": {
|
26
|
+
"regex": "none",
|
27
|
+
"alertText": "* Greška ",
|
28
|
+
"alertText2": "Raspon vremena i datuma"
|
29
|
+
},
|
30
|
+
"minSize": {
|
31
|
+
"regex": "none",
|
32
|
+
"alertText": "* Minimalno ",
|
33
|
+
"alertText2": " dozvoljenih znakova"
|
34
|
+
},
|
35
|
+
"maxSize": {
|
36
|
+
"regex": "none",
|
37
|
+
"alertText": "* Maksimalno ",
|
38
|
+
"alertText2": " dozvoljenih znakova"
|
39
|
+
},
|
40
|
+
"groupRequired": {
|
41
|
+
"regex": "none",
|
42
|
+
"alertText": "* Morate popuniti jedno od obaveznih polja"
|
43
|
+
},
|
44
|
+
"min": {
|
45
|
+
"regex": "none",
|
46
|
+
"alertText": "* Minimalna vrijednost je "
|
47
|
+
},
|
48
|
+
"max": {
|
49
|
+
"regex": "none",
|
50
|
+
"alertText": "* Maksimalna vrijednost je "
|
51
|
+
},
|
52
|
+
"past": {
|
53
|
+
"regex": "none",
|
54
|
+
"alertText": "* Datum raniji od "
|
55
|
+
},
|
56
|
+
"future": {
|
57
|
+
"regex": "none",
|
58
|
+
"alertText": "* Datum nakon "
|
59
|
+
},
|
60
|
+
"maxCheckbox": {
|
61
|
+
"regex": "none",
|
62
|
+
"alertText": "* Maksimalno ",
|
63
|
+
"alertText2": " dozvoljenih opcija"
|
64
|
+
},
|
65
|
+
"minCheckbox": {
|
66
|
+
"regex": "none",
|
67
|
+
"alertText": "* Molimo odaberite ",
|
68
|
+
"alertText2": " opcija"
|
69
|
+
},
|
70
|
+
"equals": {
|
71
|
+
"regex": "none",
|
72
|
+
"alertText": "* Polja se ne podudaraju"
|
73
|
+
},
|
74
|
+
"creditCard": {
|
75
|
+
"regex": "none",
|
76
|
+
"alertText": "* Neispravan broj kreditne kartice"
|
77
|
+
},
|
78
|
+
"phone": {
|
79
|
+
// credit: jquery.h5validate.js / orefalo
|
80
|
+
"regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
|
81
|
+
"alertText": "* Pogrešan unos telefonskog broja"
|
82
|
+
},
|
83
|
+
"email": {
|
84
|
+
// Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
|
85
|
+
"regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
|
86
|
+
"alertText": "* Neispravna email adresa"
|
87
|
+
},
|
88
|
+
"integer": {
|
89
|
+
"regex": /^[\-\+]?\d+$/,
|
90
|
+
"alertText": "* Neispravno unesen broj"
|
91
|
+
},
|
92
|
+
"number": {
|
93
|
+
// Number, including positive, negative, and floating decimal. credit: orefalo
|
94
|
+
"regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
|
95
|
+
"alertText": "* Neispravan broj sa pomičnim zarezom"
|
96
|
+
},
|
97
|
+
"date": {
|
98
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
|
99
|
+
"alertText": "* Neispravan unos datuma, ispravan format je GGGG-MM-DD"
|
100
|
+
},
|
101
|
+
"ipv4": {
|
102
|
+
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
|
103
|
+
"alertText": "* neispravna IP adresa"
|
104
|
+
},
|
105
|
+
"url": {
|
106
|
+
"regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
|
107
|
+
"alertText": "* Neispravan URL"
|
108
|
+
},
|
109
|
+
"onlyNumberSp": {
|
110
|
+
"regex": /^[0-9\ ]+$/,
|
111
|
+
"alertText": "* Dozvoljeni su samo brojevi"
|
112
|
+
},
|
113
|
+
"onlyLetterSp": {
|
114
|
+
"regex": /^[a-zA-Z\ \']+$/,
|
115
|
+
"alertText": "* Dozvoljena su samo slova"
|
116
|
+
},
|
117
|
+
"onlyLetterNumber": {
|
118
|
+
"regex": /^[0-9a-zA-Z]+$/,
|
119
|
+
"alertText": "* Nisu dozvoljeni specijalni znakovi"
|
120
|
+
},
|
121
|
+
// --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
|
122
|
+
"ajaxUserCall": {
|
123
|
+
"url": "ajaxValidateFieldUser",
|
124
|
+
// you may want to pass extra data on the ajax call
|
125
|
+
"extraData": "name=eric",
|
126
|
+
"alertText": "* This user is already taken",
|
127
|
+
"alertTextLoad": "* Validating, please wait"
|
128
|
+
},
|
129
|
+
"ajaxUserCallPhp": {
|
130
|
+
"url": "phpajax/ajaxValidateFieldUser.php",
|
131
|
+
// you may want to pass extra data on the ajax call
|
132
|
+
"extraData": "name=eric",
|
133
|
+
// if you provide an "alertTextOk", it will show as a green prompt when the field validates
|
134
|
+
"alertTextOk": "* This username is available",
|
135
|
+
"alertText": "* This user is already taken",
|
136
|
+
"alertTextLoad": "* Validating, please wait"
|
137
|
+
},
|
138
|
+
"ajaxNameCall": {
|
139
|
+
// remote json service location
|
140
|
+
"url": "ajaxValidateFieldName",
|
141
|
+
// error
|
142
|
+
"alertText": "* This name is already taken",
|
143
|
+
// if you provide an "alertTextOk", it will show as a green prompt when the field validates
|
144
|
+
"alertTextOk": "* This name is available",
|
145
|
+
// speaks by itself
|
146
|
+
"alertTextLoad": "* Validating, please wait"
|
147
|
+
},
|
148
|
+
"ajaxNameCallPhp": {
|
149
|
+
// remote json service location
|
150
|
+
"url": "phpajax/ajaxValidateFieldName.php",
|
151
|
+
// error
|
152
|
+
"alertText": "* This name is already taken",
|
153
|
+
// speaks by itself
|
154
|
+
"alertTextLoad": "* Validating, please wait"
|
155
|
+
},
|
156
|
+
"validate2fields": {
|
157
|
+
"alertText": "* Please input HELLO"
|
158
|
+
},
|
159
|
+
//tls warning:homegrown not fielded
|
160
|
+
"dateFormat":{
|
161
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
|
162
|
+
"alertText": "* Neispravan datum"
|
163
|
+
},
|
164
|
+
//tls warning:homegrown not fielded
|
165
|
+
"dateTimeFormat": {
|
166
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,
|
167
|
+
"alertText": "* Neispravan format datuma",
|
168
|
+
"alertText2": "Očekivani format: ",
|
169
|
+
"alertText3": "mm/dd/gggg hh:mm:ss ili ",
|
170
|
+
"alertText4": "gggg-mm-dd hh:mm:ss "
|
171
|
+
}
|
172
|
+
};
|
173
|
+
|
174
|
+
}
|
175
|
+
};
|
176
|
+
$.validationEngineLanguage.newLang();
|
177
|
+
})(jQuery);
|
@@ -0,0 +1,179 @@
|
|
1
|
+
(function($){
|
2
|
+
$.fn.validationEngineLanguage = function(){
|
3
|
+
};
|
4
|
+
$.validationEngineLanguage = {
|
5
|
+
newLang: function(){
|
6
|
+
$.validationEngineLanguage.allRules = {
|
7
|
+
"required": { // Add your regex rules here, you can take telephone as an example
|
8
|
+
"regex": "none",
|
9
|
+
"alertText": "* Ezt a mezőt ki kell tölteni",
|
10
|
+
"alertTextCheckboxMultiple": "* Kérem válasszon egy opciót",
|
11
|
+
"alertTextCheckboxe": "* Ez az opció be kell legyen jelölve",
|
12
|
+
"alertTextDateRange": "* Mindkét dátum mezőt ki kell tölteni"
|
13
|
+
},
|
14
|
+
"requiredInFunction": {
|
15
|
+
"func": function(field, rules, i, options){
|
16
|
+
return (field.val() == "test") ? true : false;
|
17
|
+
},
|
18
|
+
"alertText": "* Field must equal test"
|
19
|
+
},
|
20
|
+
"dateRange": {
|
21
|
+
"regex": "none",
|
22
|
+
"alertText": "* Érvénytelen ",
|
23
|
+
"alertText2": "Dátum tartomány"
|
24
|
+
},
|
25
|
+
"dateTimeRange": {
|
26
|
+
"regex": "none",
|
27
|
+
"alertText": "* Érvénytelen ",
|
28
|
+
"alertText2": "Dátum-idő tartomány"
|
29
|
+
},
|
30
|
+
"minSize": {
|
31
|
+
"regex": "none",
|
32
|
+
"alertText": "* Minimum ",
|
33
|
+
"alertText2": " karakter kell legyen"
|
34
|
+
},
|
35
|
+
"maxSize": {
|
36
|
+
"regex": "none",
|
37
|
+
"alertText": "* Maximum ",
|
38
|
+
"alertText2": " karakter lehet"
|
39
|
+
},
|
40
|
+
"groupRequired": {
|
41
|
+
"regex": "none",
|
42
|
+
"alertText": "* Az alábbi mezők valamelyikét ki kell tölteni"
|
43
|
+
},
|
44
|
+
"min": {
|
45
|
+
"regex": "none",
|
46
|
+
"alertText": "* A minimum érték "
|
47
|
+
},
|
48
|
+
"max": {
|
49
|
+
"regex": "none",
|
50
|
+
"alertText": "* A maximum érték "
|
51
|
+
},
|
52
|
+
"past": {
|
53
|
+
"regex": "none",
|
54
|
+
"alertText": "* Dátum ez előtt "
|
55
|
+
},
|
56
|
+
"future": {
|
57
|
+
"regex": "none",
|
58
|
+
"alertText": "* Dátum ez után "
|
59
|
+
},
|
60
|
+
"maxCheckbox": {
|
61
|
+
"regex": "none",
|
62
|
+
"alertText": "* Maximum ",
|
63
|
+
"alertText2": " opció lehet bejelölve"
|
64
|
+
},
|
65
|
+
"minCheckbox": {
|
66
|
+
"regex": "none",
|
67
|
+
"alertText": "* Kérjük válasszon ",
|
68
|
+
"alertText2": " opciót"
|
69
|
+
},
|
70
|
+
"equals": {
|
71
|
+
"regex": "none",
|
72
|
+
"alertText": "* A mezők nem egyeznek"
|
73
|
+
},
|
74
|
+
"creditCard": {
|
75
|
+
"regex": "none",
|
76
|
+
"alertText": "* Érvénytelen kártyaszám"
|
77
|
+
},
|
78
|
+
"phone": {
|
79
|
+
// credit: jquery.h5validate.js / orefalo
|
80
|
+
"regex": /^([\+][0-9]{1,3}[\ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9\ \.\-\/]{3,20})((m|mell|mellék)[\ ]?[0-9]{1,4})?$/,
|
81
|
+
"alertText": "* Érvénytelen telefonszám"
|
82
|
+
},
|
83
|
+
"email": {
|
84
|
+
// HTML5 compatible email regex ( http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html# e-mail-state-%28type=email%29 )
|
85
|
+
"regex": /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
|
86
|
+
"alertText": "* Hibás E-mail cím"
|
87
|
+
},
|
88
|
+
"integer": {
|
89
|
+
"regex": /^[\-\+]?\d+$/,
|
90
|
+
"alertText": "* Nem érvényes (egész) szám"
|
91
|
+
},
|
92
|
+
"number": {
|
93
|
+
// Number, including positive, negative, and floating decimal. credit: orefalo
|
94
|
+
"regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
|
95
|
+
"alertText": "* Érvénytelen szám"
|
96
|
+
},
|
97
|
+
"date": {
|
98
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
|
99
|
+
"alertText": "* Érvénytelen dátum, ÉÉÉÉ-HH-NN formátumban kell megadni"
|
100
|
+
},
|
101
|
+
"ipv4": {
|
102
|
+
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
|
103
|
+
"alertText": "* Érvénytelen IP cím"
|
104
|
+
},
|
105
|
+
"url": {
|
106
|
+
"regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
|
107
|
+
"alertText": "* Érvénytelen URL"
|
108
|
+
},
|
109
|
+
"onlyNumberSp": {
|
110
|
+
"regex": /^[0-9\ ]+$/,
|
111
|
+
"alertText": "* Csak számokat"
|
112
|
+
},
|
113
|
+
"onlyLetterSp": {
|
114
|
+
"regex": /^[a-zA-Z\ \']+$/,
|
115
|
+
"alertText": "* Csak betűket"
|
116
|
+
},
|
117
|
+
"onlyLetterNumber": {
|
118
|
+
"regex": /^[0-9a-zA-Z]+$/,
|
119
|
+
"alertText": "* Spéci karakterek nem engedélyezettek"
|
120
|
+
},
|
121
|
+
// --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
|
122
|
+
"ajaxUserCall": {
|
123
|
+
"url": "ajaxValidateFieldUser",
|
124
|
+
// you may want to pass extra data on the ajax call
|
125
|
+
"extraData": "name=eric",
|
126
|
+
"alertText": "* This user is already taken",
|
127
|
+
"alertTextLoad": "* Validating, please wait"
|
128
|
+
},
|
129
|
+
"ajaxUserCallPhp": {
|
130
|
+
"url": "phpajax/ajaxValidateFieldUser.php",
|
131
|
+
// you may want to pass extra data on the ajax call
|
132
|
+
"extraData": "name=eric",
|
133
|
+
// if you provide an "alertTextOk", it will show as a green prompt when the field validates
|
134
|
+
"alertTextOk": "* This username is available",
|
135
|
+
"alertText": "* This user is already taken",
|
136
|
+
"alertTextLoad": "* Validating, please wait"
|
137
|
+
},
|
138
|
+
"ajaxNameCall": {
|
139
|
+
// remote json service location
|
140
|
+
"url": "ajaxValidateFieldName",
|
141
|
+
// error
|
142
|
+
"alertText": "* This name is already taken",
|
143
|
+
// if you provide an "alertTextOk", it will show as a green prompt when the field validates
|
144
|
+
"alertTextOk": "* This name is available",
|
145
|
+
// speaks by itself
|
146
|
+
"alertTextLoad": "* Validating, please wait"
|
147
|
+
},
|
148
|
+
"ajaxNameCallPhp": {
|
149
|
+
// remote json service location
|
150
|
+
"url": "phpajax/ajaxValidateFieldName.php",
|
151
|
+
// error
|
152
|
+
"alertText": "* This name is already taken",
|
153
|
+
// speaks by itself
|
154
|
+
"alertTextLoad": "* Validating, please wait"
|
155
|
+
},
|
156
|
+
"validate2fields": {
|
157
|
+
"alertText": "* Please input HELLO"
|
158
|
+
},
|
159
|
+
//tls warning:homegrown not fielded
|
160
|
+
"dateFormat":{
|
161
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
|
162
|
+
"alertText": "* Invalid Date"
|
163
|
+
},
|
164
|
+
//tls warning:homegrown not fielded
|
165
|
+
"dateTimeFormat": {
|
166
|
+
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,
|
167
|
+
"alertText": "* Invalid Date or Date Format",
|
168
|
+
"alertText2": "Expected Format: ",
|
169
|
+
"alertText3": "mm/dd/yyyy hh:mm:ss AM|PM or ",
|
170
|
+
"alertText4": "yyyy-mm-dd hh:mm:ss AM|PM"
|
171
|
+
}
|
172
|
+
};
|
173
|
+
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
$.validationEngineLanguage.newLang();
|
178
|
+
|
179
|
+
})(jQuery);
|