PageSourceSearch

https://spoex.com/resources/js/common/_Validate.js

js spoex.com collected 2026-10-04 16:15:49 UTC 1,295 bytes, 38 lines download raw bytes

1
2/*
3 * 메세지를 경고창으로 뜨게 기본 설정을 함
4 * rules과 messages는 각 페이지에 맞게 인자값으로 넘겨 주어야 함
5 * */
6$.fn.cmsValidate = function (opt) {
7	var option = {
8			onfocusout: false,
9		    errorPlacement: function(error, element) {
10		    	
11			}, invalidHandler: function(form, validator) {
12				 var errors = validator.numberOfInvalids();
13		         if (errors) {
14		        	 $.alert(validator.errorList[0].message);
15		             validator.errorList[0].element.focus();
16		         }          
17			}
18		}
19	
20    //영문숫자만
21    jQuery.validator.addMethod("alphanumeric", function (value, element) {
22        return this.optional(element) || /^[a-zA-Z0-9]+$/.test(value);
23    });
24	//영문만
25    jQuery.validator.addMethod("alpha", function (value, element) {
26        return this.optional(element) || /^[a-zA-Z]+$/.test(value);
27    });
28    //숫자만
29    jQuery.validator.addMethod("numeric", function (value, element) {
30        return this.optional(element) || /^[0-9]+$/.test(value);
31    });
32    //한글만
33    $.validator.addMethod("hangle", function (value, element) {
34        return this.optional(element) || /^[\uAC00-\uD7A3]+$/.test(value);
35    }, "");	
36	
37	$(this).validate($.extend( option, opt ));
38}

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.