PageSourceSearch

https://www.itoris.com/components/com_sfg/files/form_26_validator_cache.js

js itoris.com collected 2026-09-25 18:20:50 UTC 8,144 bytes, 156 lines download raw bytes

1function validator26_0(obj, sfgName, obj2) {
2// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
3var msg = 'Field: %s. Field is required';
4msg = msg.replace('%s', sfgName); 
5if (obj.type && (obj.type.toLowerCase()=='checkbox' || obj.type.toLowerCase()=='radio') && !obj.checked) return msg; 
6if (obj.tagName.toLowerCase()=='select' && (obj.selectedIndex==-1 || obj.selectedIndex==0)) return msg; 
7if (obj.value=='') return msg;
8}
9
10function validator26_1(obj, sfgName, obj2) {
11// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
12var msg = 'Group: %s. Please select a value';
13msg = msg.replace('%s', sfgName); 
14var objs = document.getElementsByName(obj.name); 
15var checked = false; 
16for (i=0; i<objs.length; i++) if (objs[i].checked) { checked = true; break; } 
17if (!checked) return msg;
18}
19
20function validator26_2(obj, sfgName, obj2) {
21// incoming variables: obj - HTML element firing the event, sfgName - system name of the object, obj2 - another HTML element for comparing
22var msg = 'Field: %s. Entities are not identival';
23msg = msg.replace('%s', sfgName);
24var el2 = document.getElementsByName(obj2)[0];
25if (el2 && obj.value != el2.value) return msg;
26}
27
28function validator26_3(obj, sfgName, obj2) {
29// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
30var msg = 'Field: %s. Invalid email. Please specify a valid value';
31msg = msg.replace('%s', sfgName);
32var RegExp=/^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/;
33if (obj.value!='' && !RegExp.test(obj.value.toLowerCase())) return msg;
34}
35
36function validator26_4(obj, sfgName, obj2) {
37// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
38var msg = 'Field: %s. Please specify a correct zip/postal';
39msg = msg.replace('%s', sfgName);
40var letters='qwertyuiopasdfghjklzxcvbnm -1234567890';
41var ps=false;
42for(i=0;i<obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))<0) ps=true;
43if (ps || obj.value.length>10) return msg;
44}
45
46function validator26_5(obj, sfgName, obj2) {
47// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
48var msg = 'Field: %s. Invalid US Zip. Please specify a valid value';
49msg = msg.replace('%s', sfgName);
50var zipPattern1=/^(\d{5})$/;
51var zipPattern2=/^(\d{5})\-(\d{4})$/;
52if ((obj.value.match(zipPattern1)==null)&&(obj.value.match(zipPattern2)==null)&&obj.value.length>0) return msg;
53}
54
55function validator26_6(obj, sfgName, obj2) {
56// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
57var msg = 'Field: %s. Please specify a correct phone number';
58msg = msg.replace('%s', sfgName);
59var letters='1234567890 -.()+';
60var ps=false;
61for(i=0;i<obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))<0) ps=true;
62if (ps || obj.value.length>10) return msg;
63}
64
65function validator26_7(obj, sfgName, obj2) {
66// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
67var msg = 'Field: %s. Invalid value! Please, provide a phone number in format XXX-XXX-XXXX, where X is a digit.';
68msg = msg.replace('%s', sfgName);
69var phonePattern=/^(\d{3})\-(\d{3})\-(\d{4})$/;
70if ((obj.value.match(phonePattern)==null)&&obj.value.length>0) return msg;
71}
72
73function validator26_8(obj, sfgName, obj2) {
74// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
75var msg = 'Field: %s. The password should contain 6 to 12 symbols';
76msg = msg.replace('%s', sfgName);
77if ((obj.value.length<6 || obj.value.length>12) && obj.value.length!=0) return msg;
78}
79
80function validator26_9(obj, sfgName, obj2) {
81// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
82var msg = 'Field: %s. Please specify a correct credit card number';
83msg = msg.replace('%s', sfgName);
84var ccPattern=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/;
85if ((obj.value.match(ccPattern)==null)&&obj.value.length>0) return msg;
86}
87
88function validator26_10(obj, sfgName, obj2) {
89// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
90var msg = 'Field: %s. Please specify a correct credit card CVV';
91msg = msg.replace('%s', sfgName);
92var letters='1234567890';
93var ps=false;
94for(i=0;i<obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))<0) ps=true;
95if (ps || (obj.value.length<3 && obj.value.length!=0) || obj.value.length>4) return msg;
96}
97
98function validator26_11(obj, sfgName, obj2) {
99// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
100var msg = 'Field: %s. Please specify currency correctly';
101msg = msg.replace('%s', sfgName);
102var letters='1234567890.';
103var ps=false; for(i=0;i<obj.value.length;i++) if (letters.indexOf(obj.value.toLowerCase().substr(i,1))<0) ps=true;
104if (ps || obj.value.length>10 || Math.floor(obj.value*100)/100!=obj.value-0) return msg;
105}
106
107function validator26_12(obj, sfgName, obj2) {
108// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
109var msg = 'Field: %s. Please specify a valid URL';
110msg = msg.replace('%s', sfgName);
111var RegExp=/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/;
112if (obj.value!='' && !RegExp.test(obj.value)) return msg;
113}
114
115function validator26_13(obj, sfgName, obj2) {
116// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
117var msg = 'Field: %s. Please specify a correct IP';
118msg = msg.replace('%s', sfgName);
119var RegExp=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
120var a=obj.value.split('.');
121if (obj.value!='' && !RegExp.test(obj.value) || a[0]>255 || a[1]>255 || a[2]>255 || a[3]>255) return msg;
122}
123
124function validator26_14(obj, sfgName, obj2) {
125// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
126var msg = 'Field: %s. Invalid value! Please, provide a SSN in format XXX-XX-XXXX or XX-XXXXXXX, where X is a digit.';
127msg = msg.replace('%s', sfgName);
128var ssnPattern1 = /^(\d{3})\-(\d{2})\-(\d{4})$/;
129var ssnPattern2 = /^(\d{2})\-(\d{7})$/;
130if ((obj.value.match(ssnPattern1)==null)&&(obj.value.match(ssnPattern2)==null)&&obj.value.length>0) return msg;
131}
132
133function validator26_15(obj, sfgName, obj2) {
134// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
135var msg = 'Field: %s. Invalid value! Field value should be in MM/DD/YYYY format.';
136msg = msg.replace('%s', sfgName);
137var a=obj.value.split('/');
138if (a[0]-0>0 && a[0]-0<=12 && a[1]-0>0 && a[1]-0<=31 && a[2]-0>1000 && a[2]-0<=9999 && a[3]==null ||obj.value.length==0) return null; else return msg;
139}
140
141function validator26_16(obj, sfgName, obj2) {
142// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
143var msg = 'Field: %s. Invalid value! Field value should be in MM/DD/YY format';
144msg = msg.replace('%s', sfgName);
145var a=obj.value.split('/');
146if (a[0]-0>0 && a[0]-0<=12 && a[1]-0>0 && a[1]-0<=31 && a[2]-0>=0 && a[2]-0<=99 && a[3]==null ||obj.value.length==0) return null; else return msg;
147}
148
149function validator26_17(obj, sfgName, obj2) {
150// incoming variables: obj - HTML element firing the event, sfgName - system name of the object 
151var msg = 'Field: %s. Invalid value! Field value should be in HH:MM format.';
152msg = msg.replace('%s', sfgName);
153var a=obj.value.split(':');
154if (a[0]-0>=0 && a[0]-0<24 && a[1]-0>=0 && a[1]-0<60 && a[2]==null ||obj.value.length==0) return null; else return msg;
155}
156

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.