All Downloads are FREE. Search and download functionalities are using the official Maven repository.

2sql.0.0.0.11.source-code.validator.js Maven / Gradle / Ivy

importPackage(java.util);

function init(map, errors, arrayStr){
	var array = eval('('+arrayStr+')');
	var handle = function($){
		var msg = '';
		if(a.error){
			msg = a.error;
		}
		var v = function(regex, data){
			var t = vRegex[regex];
			if(t){
				if(msg){
					
				}else if(t.error){
					msg = t.error;
				}
				if(t.regex){
					regex = t.regex;
				}
				if(t.fun){
					return t.fun(data);
				}
			}
			// 执行 
			return (new RegExp(regex, 'i')).test(data);
		};
		var script = a.func;
		if(script.search('return')==-1){
			script = 'return ' + script;
		}
		var retVal = eval('((function(){' + script + '})())');
		
		if(retVal===false){
			errors.put(a.name, msg);//增加错误
			if($ && v){};//仅为去掉警告!!!!
			return true;
		}
	};
	
	
	for(var i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy