findList(XitUserAbsntMngSearchVO searchVO) {
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/user/service/bean/XitUserEtcOptMngServiceBean.java b/src/main/java/cokr/xit/fims/framework/biz/mng/user/service/bean/XitUserEtcOptMngServiceBean.java
index a8ac2b5d..766a4cf9 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/user/service/bean/XitUserEtcOptMngServiceBean.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/user/service/bean/XitUserEtcOptMngServiceBean.java
@@ -25,8 +25,6 @@ public class XitUserEtcOptMngServiceBean extends AbstractServiceBean implements
private XitFrameCrudService xitFrameCrudService;
@Resource
private XitFrameUnitService xitFrameUnitService;
- @Resource
- private ReloadableResourceBundleMessageSource messageSource;
@Override
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserAbsntMngController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserAbsntMngController.java
index cb4d9eb2..5cf4c8da 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserAbsntMngController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserAbsntMngController.java
@@ -10,7 +10,7 @@ import cokr.xit.fims.framework.core.constants.FrameworkConstants;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
-import cokr.xit.fims.framework.core.validation.XitBeanValidator;
+
import cokr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
@@ -49,10 +49,8 @@ public class XitUserAbsntMngController extends AbstractController {
@Resource
private XitUserAbsntMngService xitUserAbsntMngService;
- @Autowired
- private XitBeanValidator beanValidator;
- @Resource(name = "messageSource")
- ReloadableResourceBundleMessageSource messageSource;
+
+
@Resource
private XitFrameCodeService xitFrameCodeService;
@@ -223,8 +221,8 @@ public class XitUserAbsntMngController extends AbstractController {
XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
switch (cmd) {
case "insert": //등록
- //유효성 확인
- beanValidator.validate(vo, bindingResult);
+
+
if (bindingResult.hasErrors()) {
message = "생성에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_input";
@@ -249,8 +247,7 @@ public class XitUserAbsntMngController extends AbstractController {
// break;
case "update": //수정
- //유효성 확인
- beanValidator.validate(vo, bindingResult);
+
if (bindingResult.hasErrors()) {
message = "변경에 실패하였습니다.";
sLocationUrl = "forward:/framework/biz/mng/usr/userAbsntMng_edit";
diff --git a/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserEtcOptMngController.java b/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserEtcOptMngController.java
index ef3a6299..f1bc85d0 100644
--- a/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserEtcOptMngController.java
+++ b/src/main/java/cokr/xit/fims/framework/biz/mng/user/web/XitUserEtcOptMngController.java
@@ -43,8 +43,7 @@ public class XitUserEtcOptMngController extends AbstractController {
@Resource
private XitUserEtcOptMngService xitUserEtcOptMngService;
- @Resource(name = "messageSource")
- ReloadableResourceBundleMessageSource messageSource;
+
@Resource
private XitFrameCodeService xitFrameCodeService;
diff --git a/src/main/java/cokr/xit/fims/framework/core/aop/XitLoginLogAspect.java b/src/main/java/cokr/xit/fims/framework/core/aop/XitLoginLogAspect.java
index 2db3c8b6..e86ac4b5 100644
--- a/src/main/java/cokr/xit/fims/framework/core/aop/XitLoginLogAspect.java
+++ b/src/main/java/cokr/xit/fims/framework/core/aop/XitLoginLogAspect.java
@@ -28,11 +28,10 @@ import javax.servlet.http.HttpServletRequest;
public class XitLoginLogAspect {
@Resource
private XitFrameCrudService xitFrameCrudService;
- @Autowired
+
@Qualifier("xitConectLogIdGnrService")
private EgovIdGnrService xitConectLogIdGnrService;
- @Resource
- private ReloadableResourceBundleMessageSource messageSource;
+
/**
* 메소드 설명: 사용자의 로그인 로그를 생성 한다.
diff --git a/src/main/java/cokr/xit/fims/framework/core/interceptor/XitAccessIntercepter.java b/src/main/java/cokr/xit/fims/framework/core/interceptor/XitAccessIntercepter.java
index 1425e461..6cca8afa 100644
--- a/src/main/java/cokr/xit/fims/framework/core/interceptor/XitAccessIntercepter.java
+++ b/src/main/java/cokr/xit/fims/framework/core/interceptor/XitAccessIntercepter.java
@@ -27,8 +27,6 @@ import java.io.PrintWriter;
@Service
public class XitAccessIntercepter extends HandlerInterceptorAdapter {
- @Resource(name = "messageSource")
- ReloadableResourceBundleMessageSource messageSource;
/**
* 사이트 접근 시 사용자의 인증 여부를 확인 한다.
diff --git a/src/main/java/cokr/xit/fims/framework/core/validation/XitBeanValidator.java b/src/main/java/cokr/xit/fims/framework/core/validation/XitBeanValidator.java
deleted file mode 100644
index 2d550e77..00000000
--- a/src/main/java/cokr/xit/fims/framework/core/validation/XitBeanValidator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cokr.xit.fims.framework.core.validation;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.validator.Validator;
-import org.apache.commons.validator.ValidatorException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.Errors;
-import org.springmodules.validation.commons.DefaultBeanValidator;
-import org.springmodules.validation.commons.DefaultValidatorFactory;
-
-/**
- *
- * @업무그룹명: Bean Validator 클래스
- * @설명: Spring Framework DefaultBeanValidator의 확장 기능을 제공 한다.
- * @최초작성일: 2020. 11. 24. 오후 4:45:10
- * @최초작성자: 박민규
- * @author (주)엑스아이티 개발팀
- * @since 2002. 2. 2.
- * @version 1.0 Copyright(c) XIT All rights reserved.
- */
-public class XitBeanValidator extends DefaultBeanValidator {
- private static final Log log = LogFactory.getLog(XitBeanValidator.class);
-
- @Autowired
- DefaultValidatorFactory defaultValidatorFactory;
-
- /**
- * 메소드 설명: DefaultBeanValidator의 validate(Object obj, Errors errors)의 확장 기능.
- * -DefaultBeanValidator.validate의 경우 Bean 클래스 명칭을 form name으로 사용하기에 원칙적으로 "formName==BeanClassName"(이)가 성립하는 경우에만 validate 체크가 수행 된다.
- * -본 메서드는 DefaultBeanValidator의 validate(Object obj, Errors errors) 메서드의 기능과 동일하나 form name을 직접 입력 받아 validate 체크를 수행 하기에
- * -"formName!=BeanClassName"(이)가 성립하는 경우 본 메서드를 활용 할 수 있다.
- *
- * @param formName form-validation에 기술한 form name
- * @param obj bean(==VO)객체
- * @param errors void 요청처리 후 응답객체
- * @author: 박민규
- * @date: 2020. 11. 24.
- */
- public void validate(String formName, Object obj, Errors errors) {
- Validator commonsValidator = this.getValidator(formName, obj, errors);
- initValidator(commonsValidator);
- try {
- commonsValidator.validate();
- }
- catch (ValidatorException e) {
- log.error("Exception while validating object " + obj, e);
- } finally {
- cleanupValidator(commonsValidator);
- }
- }
-
-
- private Validator getValidator(String beanName, Object bean, Errors errors) {
- Validator validator = new Validator(defaultValidatorFactory.getValidatorResources(), beanName);
- validator.setParameter(DefaultValidatorFactory.ERRORS_KEY, errors);
- validator.setParameter(Validator.BEAN_PARAM, bean);
- return validator;
- }
-
-
-}
diff --git a/src/main/java/cokr/xit/fims/framework/support/util/JBeanRegistry.java b/src/main/java/cokr/xit/fims/framework/support/util/JBeanRegistry.java
index 258a9462..d20ef778 100644
--- a/src/main/java/cokr/xit/fims/framework/support/util/JBeanRegistry.java
+++ b/src/main/java/cokr/xit/fims/framework/support/util/JBeanRegistry.java
@@ -2,7 +2,7 @@ package cokr.xit.fims.framework.support.util;
import cokr.xit.fims.framework.biz.cache.service.CacheService;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
-import cokr.xit.fims.framework.core.validation.XitBeanValidator;
+
import org.springframework.context.MessageSource;
import org.springframework.context.support.MessageSourceAccessor;
@@ -12,9 +12,6 @@ import org.springframework.context.support.MessageSourceAccessor;
*/
public class JBeanRegistry {
- public static XitBeanValidator getValidator() {
- return (XitBeanValidator)SpringUtils.getBean(XitBeanValidator.class);
- }
/**
* 메시지소스 객체를 반환한다.
diff --git a/src/main/java/cokr/xit/fims/framework/support/util/ValidationError.java b/src/main/java/cokr/xit/fims/framework/support/util/ValidationError.java
index f566f927..1e0776d0 100644
--- a/src/main/java/cokr/xit/fims/framework/support/util/ValidationError.java
+++ b/src/main/java/cokr/xit/fims/framework/support/util/ValidationError.java
@@ -1,6 +1,6 @@
package cokr.xit.fims.framework.support.util;
-import cokr.xit.fims.framework.core.validation.XitBeanValidator;
+
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
import cokr.xit.fims.framework.support.util.dto.FieldErrorDtl;
import lombok.AllArgsConstructor;
@@ -33,12 +33,8 @@ public class ValidationError {
}
public static void of(String voName, Object o, BindingResult bindingResult){
- XitBeanValidator validator = JBeanRegistry.getValidator();
- validator.validate(voName, o, bindingResult);
- if (bindingResult.hasErrors()) {
- FieldErrorDtl fieldErrorDtl = ValidationError.errorList(bindingResult.getFieldErrors()).get(0);
- throw BizRuntimeException.create(fieldErrorDtl.getCode(), fieldErrorDtl.getArguments());
- }
+
+
}
}
diff --git a/src/main/resources/spring/context-idgen-xit.xml b/src/main/resources/spring/context-idgen-xit.xml
index 0d842260..9a29f2c1 100644
--- a/src/main/resources/spring/context-idgen-xit.xml
+++ b/src/main/resources/spring/context-idgen-xit.xml
@@ -192,44 +192,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/src/main/resources/spring/context-validator.xml b/src/main/resources/spring/context-validator.xml
deleted file mode 100644
index 6eb254e8..00000000
--- a/src/main/resources/spring/context-validator.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- classpath:/validator/validator-rules-xit.xml
- classpath:/validator/framework/***/**/*.xml
-
-
- classpath:/validator/biz/**/*.xml
-
-
-
-
-
diff --git a/src/main/resources/validator/biz/adm/SendRqstMng.xml b/src/main/resources/validator/biz/adm/SendRqstMng.xml
deleted file mode 100644
index 44189547..00000000
--- a/src/main/resources/validator/biz/adm/SendRqstMng.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/biz/sysadm/LinkInfoMng.xml b/src/main/resources/validator/biz/sysadm/LinkInfoMng.xml
deleted file mode 100644
index eaab17ff..00000000
--- a/src/main/resources/validator/biz/sysadm/LinkInfoMng.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/biz/sysadm/NotiMng.xml b/src/main/resources/validator/biz/sysadm/NotiMng.xml
deleted file mode 100644
index 51f074b9..00000000
--- a/src/main/resources/validator/biz/sysadm/NotiMng.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/cmm/answer/CmmAnsTmpl.xml b/src/main/resources/validator/framework/cmm/answer/CmmAnsTmpl.xml
deleted file mode 100644
index b0fdc853..00000000
--- a/src/main/resources/validator/framework/cmm/answer/CmmAnsTmpl.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml b/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml
deleted file mode 100644
index ab3fabda..00000000
--- a/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/batch/XitBatchRegMng.xml b/src/main/resources/validator/framework/mng/batch/XitBatchRegMng.xml
deleted file mode 100644
index c9fb7010..00000000
--- a/src/main/resources/validator/framework/mng/batch/XitBatchRegMng.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/batch/XitBatchSchduleMng.xml b/src/main/resources/validator/framework/mng/batch/XitBatchSchduleMng.xml
deleted file mode 100644
index 492f2d85..00000000
--- a/src/main/resources/validator/framework/mng/batch/XitBatchSchduleMng.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/bbs/XitBasicBbsMng.xml b/src/main/resources/validator/framework/mng/bbs/XitBasicBbsMng.xml
deleted file mode 100644
index 01ad7bba..00000000
--- a/src/main/resources/validator/framework/mng/bbs/XitBasicBbsMng.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/bbs/XitBbsBasicMng.xml b/src/main/resources/validator/framework/mng/bbs/XitBbsBasicMng.xml
deleted file mode 100644
index e6bb351a..00000000
--- a/src/main/resources/validator/framework/mng/bbs/XitBbsBasicMng.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/bbs/XitBbsCreateMng.xml b/src/main/resources/validator/framework/mng/bbs/XitBbsCreateMng.xml
deleted file mode 100644
index a72a9c25..00000000
--- a/src/main/resources/validator/framework/mng/bbs/XitBbsCreateMng.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/bbs/XitBbsTmplateMng.xml b/src/main/resources/validator/framework/mng/bbs/XitBbsTmplateMng.xml
deleted file mode 100644
index 7ab447c2..00000000
--- a/src/main/resources/validator/framework/mng/bbs/XitBbsTmplateMng.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/code/XitClCodeMng.xml b/src/main/resources/validator/framework/mng/code/XitClCodeMng.xml
deleted file mode 100644
index a9630057..00000000
--- a/src/main/resources/validator/framework/mng/code/XitClCodeMng.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/code/XitCmmnCodeMng.xml b/src/main/resources/validator/framework/mng/code/XitCmmnCodeMng.xml
deleted file mode 100644
index 90d3ed6f..00000000
--- a/src/main/resources/validator/framework/mng/code/XitCmmnCodeMng.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/code/XitDetailCodeMng.xml b/src/main/resources/validator/framework/mng/code/XitDetailCodeMng.xml
deleted file mode 100644
index cb396117..00000000
--- a/src/main/resources/validator/framework/mng/code/XitDetailCodeMng.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/code/XitZipCodeMng.xml b/src/main/resources/validator/framework/mng/code/XitZipCodeMng.xml
deleted file mode 100644
index 75d60e39..00000000
--- a/src/main/resources/validator/framework/mng/code/XitZipCodeMng.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/menu/XitMenuListMng.xml b/src/main/resources/validator/framework/mng/menu/XitMenuListMng.xml
deleted file mode 100644
index 3162662d..00000000
--- a/src/main/resources/validator/framework/mng/menu/XitMenuListMng.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/menu/XitProgramMng.xml b/src/main/resources/validator/framework/mng/menu/XitProgramMng.xml
deleted file mode 100644
index 8d936168..00000000
--- a/src/main/resources/validator/framework/mng/menu/XitProgramMng.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/menu/XitProgrmManageDtl.xml b/src/main/resources/validator/framework/mng/menu/XitProgrmManageDtl.xml
deleted file mode 100644
index b1a62a05..00000000
--- a/src/main/resources/validator/framework/mng/menu/XitProgrmManageDtl.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/policy/XitLoginPolicyMng.xml b/src/main/resources/validator/framework/mng/policy/XitLoginPolicyMng.xml
deleted file mode 100644
index 61f8eb93..00000000
--- a/src/main/resources/validator/framework/mng/policy/XitLoginPolicyMng.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/framework/mng/usr/XitUserRegMng.xml b/src/main/resources/validator/framework/mng/usr/XitUserRegMng.xml
deleted file mode 100644
index 4c0805a9..00000000
--- a/src/main/resources/validator/framework/mng/usr/XitUserRegMng.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/validator/framework/mng/usr/XitUserRegMngOfEditPwd.xml b/src/main/resources/validator/framework/mng/usr/XitUserRegMngOfEditPwd.xml
deleted file mode 100644
index 412bf27f..00000000
--- a/src/main/resources/validator/framework/mng/usr/XitUserRegMngOfEditPwd.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/validator/validator-rules-xit.xml b/src/main/resources/validator/validator-rules-xit.xml
deleted file mode 100644
index 3529d201..00000000
--- a/src/main/resources/validator/validator-rules-xit.xml
+++ /dev/null
@@ -1,1530 +0,0 @@
-
-
-
-
-
-
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else if (field.type == 'radio' || field.type == 'checkbox') {
- if (field.checked) {
- value = field.value;
- }
- } else {
- value = field.value;
- }
- if (trim(value).length == 0) {
- if ((i == 0) && (field.type != 'hidden')) {
- focusField = field;
- }
- fields[i++] = oRequired[x][1];
- isValid = false;
- }
- } else if (field.type == "select-multiple") {
- var numOptions = field.options.length;
- lastSelected=-1;
- for(loop=numOptions-1;loop>=0;loop--) {
- if(field.options[loop].selected) {
- lastSelected = loop;
- value = field.options[loop].value;
- break;
- }
- }
- if(lastSelected < 0 || trim(value).length == 0) {
- if(i == 0) {
- focusField = field;
- }
- fields[i++] = oRequired[x][1];
- isValid=false;
- }
- } else if ((field.length > 0) && (field[0].type == 'radio' || field[0].type == 'checkbox')) {
- isChecked=-1;
- for (loop=0;loop < field.length;loop++) {
- if (field[loop].checked) {
- isChecked=loop;
- break; // only one needs to be checked
- }
- }
- if (isChecked < 0) {
- if (i == 0) {
- focusField = field[0];
- }
- fields[i++] = oRequired[x][1];
- isValid=false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- // Trim whitespace from left and right sides of s.
- function trim(s) {
- return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
- }
-
- ]]>
-
-
-
-
-
-
-
-
-
-
-
- 0) && (field.value.length < iMin)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMinLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
-
-
-
-
-
-
-
- iMax) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMaxLength[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
-
-
-
-
-
-
-
- 0)) {
-
- if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oMasked[x][1];
- isValid = false;
- }
- }
- }
-
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }
-
- function matchPattern(value, mask) {
- return mask.exec(value);
- }]]>
-
-
-
-
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oByte[x][1];
- bValid = false;
- }
- }
- }
-
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
-
-
-
-
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
-
- } else {
-
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oShort[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
-
-
-
-
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
-
- if (!isAllDigits(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
-
- } else {
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isAllDigits(argvalue) {
- argvalue = argvalue.toString();
- var validChars = "0123456789";
- var startFrom = 0;
- if (argvalue.substring(0, 2) == "0x") {
- validChars = "0123456789abcdefABCDEF";
- startFrom = 2;
- } else if (argvalue.charAt(0) == "0") {
- validChars = "01234567";
- startFrom = 1;
- } else if (argvalue.charAt(0) == "-") {
- startFrom = 1;
- }
-
- for (var n = startFrom; n < argvalue.length; n++) {
- if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
- }
- return true;
- }]]>
-
-
-
-
-
-
-
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
- // remove '.' before checking digits
- var tempArray = value.split('.');
- var joinedString= tempArray.join('');
-
- if (!isAllDigits(joinedString)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
-
- } else {
- var iValue = parseFloat(value);
- if (isNaN(iValue)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oFloat[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }]]>
-
-
-
-
-
-
-
-
-
-
- 0) &&
- (datePattern.length > 0)) {
- var MONTH = "MM";
- var DAY = "dd";
- var YEAR = "yyyy";
- var orderMonth = datePattern.indexOf(MONTH);
- var orderDay = datePattern.indexOf(DAY);
- var orderYear = datePattern.indexOf(YEAR);
- if ((orderDay < orderYear && orderDay > orderMonth)) {
- var iDelim1 = orderMonth + MONTH.length;
- var iDelim2 = orderDay + DAY.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderDay && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderDay) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[2], matched[1], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
- var iDelim1 = orderDay + DAY.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
- } else if (iDelim2 == orderYear) {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
- } else {
- dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[1], matched[2], matched[3])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
- var iDelim1 = orderYear + YEAR.length;
- var iDelim2 = orderMonth + MONTH.length;
- var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
- var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
- if (iDelim1 == orderMonth && iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
- } else if (iDelim1 == orderMonth) {
- dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
- } else if (iDelim2 == orderDay) {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
- } else {
- dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
- }
- var matched = dateRegexp.exec(value);
- if(matched != null) {
- if (!isValidDate(matched[3], matched[2], matched[1])) {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- } else {
- if (i == 0) {
- focusField = form[oDate[x][0]];
- }
- fields[i++] = oDate[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isValidDate(day, month, year) {
- if (month < 1 || month > 12) {
- return false;
- }
- if (day < 1 || day > 31) {
- return false;
- }
- if ((month == 4 || month == 6 || month == 9 || month == 11) &&
- (day == 31)) {
- return false;
- }
- if (month == 2) {
- var leap = (year % 4 == 0 &&
- (year % 100 != 0 || year % 400 == 0));
- if (day>29 || (day == 29 && !leap)) {
- return false;
- }
- }
- return true;
- }]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0)) {
-
- var iMin = parseInt(oRange[x][2]("min"));
- var iMax = parseInt(oRange[x][2]("max"));
- var iValue = parseInt(field.value);
- if (!(iValue >= iMin && iValue <= iMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
-
-
-
-
-
-
- 0)) {
-
- var fMin = parseFloat(oRange[x][2]("min"));
- var fMax = parseFloat(oRange[x][2]("max"));
- var fValue = parseFloat(field.value);
- if (!(fValue >= fMin && fValue <= fMax)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oRange[x][1];
- isValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return isValid;
- }]]>
-
-
-
-
-
-
- 0)) {
- if (!luhnCheck(form[oCreditCard[x][0]].value)) {
- if (i == 0) {
- focusField = form[oCreditCard[x][0]];
- }
- fields[i++] = oCreditCard[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
- */
- function luhnCheck(cardNumber) {
- if (isLuhnNum(cardNumber)) {
- var no_digit = cardNumber.length;
- var oddoeven = no_digit & 1;
- var sum = 0;
- for (var count = 0; count < no_digit; count++) {
- var digit = parseInt(cardNumber.charAt(count));
- if (!((count & 1) ^ oddoeven)) {
- digit *= 2;
- if (digit > 9) digit -= 9;
- };
- sum += digit;
- };
- if (sum == 0) return false;
- if (sum % 10 == 0) return true;
- };
- return false;
- }
-
- function isLuhnNum(argvalue) {
- argvalue = argvalue.toString();
- if (argvalue.length == 0) {
- return false;
- }
- for (var n = 0; n < argvalue.length; n++) {
- if ((argvalue.substring(n, n+1) < "0") ||
- (argvalue.substring(n,n+1) > "9")) {
- return false;
- }
- }
- return true;
- }]]>
-
-
-
-
-
-
-
- 0)) {
- if (!checkEmail(form[oEmail[x][0]].value)) {
- if (i == 0) {
- focusField = form[oEmail[x][0]];
- }
- fields[i++] = oEmail[x][1];
- bValid = false;
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
- * http://javascript.internet.com
- */
- function checkEmail(emailStr) {
- if (emailStr.length == 0) {
- return true;
- }
- var emailPat=/^(.+)@(.+)$/;
- var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
- var validChars="\[^\\s" + specialChars + "\]";
- var quotedUser="(\"[^\"]*\")";
- var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
- var atom=validChars + '+';
- var word="(" + atom + "|" + quotedUser + ")";
- var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
- var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
- var matchArray=emailStr.match(emailPat);
- if (matchArray == null) {
- return false;
- }
- var user=matchArray[1];
- var domain=matchArray[2];
- if (user.match(userPat) == null) {
- return false;
- }
- var IPArray = domain.match(ipDomainPat);
- if (IPArray != null) {
- for (var i = 1; i <= 4; i++) {
- if (IPArray[i] > 255) {
- return false;
- }
- }
- return true;
- }
- var domainArray=domain.match(domainPat);
- if (domainArray == null) {
- return false;
- }
- var atomPat=new RegExp(atom,"g");
- var domArr=domain.match(atomPat);
- var len=domArr.length;
- if ((domArr[domArr.length-1].length < 2) ||
- (domArr[domArr.length-1].length > 3)) {
- return false;
- }
- if (len < 2) {
- return false;
- }
- return true;
- }]]>
-
-
-
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- /**
- * Reference: JS Guide
- * http://jsguide.net/ver2/articles/frame.php?artnum=002
- */
- function checkIhIdNum(ihidnum){
-
- fmt = /^\d{6}[1234]\d{6}$/;
- if(!fmt.test(ihidnum)){
- return false;
- }
-
- birthYear = (ihidnum.charAt(7) <= "2") ? "19" : "20";
- birthYear += ihidnum.substr(0, 2);
- birthMonth = ihidnum.substr(2, 2) - 1;
- birthDate = ihidnum.substr(4, 2);
- birth = new Date(birthYear, birthMonth, birthDate);
-
- if( birth.getYear() % 100 != ihidnum.substr(0, 2) ||
- birth.getMonth() != birthMonth ||
- birth.getDate() != birthDate) {
- return false;
- }
-
- var arrDivide = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5];
- var checkdigit = 0;
- for(var i=0;i
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function checkKorean(koreanStr){
- for(var i=0;i
-
-
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function checkPassword1(pwd) {
- p_pass = pwd.value;
-
- if (pwd.value.length < 8 || pwd.value.length > 20 ){
-
- pwd.value ="";
- pwd.focus();
- return false;
- }
- return pwd;
- }
- ]]>
-
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function checkPassword2(pwd) {
- var str = pwd.value;
- for (var i=0; i < str .length; i++) {
- ch_char = str .charAt(i);
- ch = ch_char.charCodeAt();
- if( (ch >= 33 && ch <= 47) || (ch >= 58 && ch <= 64) || (ch >= 91 && ch <= 96) || (ch >= 123 && ch <= 126) ) {
- return false;
- }
- }
- return pwd;
- }
- ]]>
-
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function checkPassword3(pwd) {
- p_pass = pwd.value;
- var cnt=0,cnt2=1,cnt3=1;
- var temp="";
-
- for(i=0;i < p_pass.length;i++){
- temp_pass1 = p_pass.charAt(i);
- next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1;
- temp_p = p_pass.charAt(i+1);
- temp_pass2 = (parseInt(temp_p.charCodeAt(0)));
- if (temp_pass2 == next_pass)
- cnt2 = cnt2 + 1;
- else
- cnt2 = 1;
- if (temp_pass1 == temp_p)
- cnt3 = cnt3 + 1;
- else
- cnt3 = 1;
- if (cnt2 > 3) break;
- if (cnt3 > 3) break;
- }
- if (cnt2 > 3){
- pwd.value ="";
- pwd.focus();
- return false;
- }
- return pwd;
- }
- ]]>
-
-
-
-
- 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function checkPassword4(pwd) {
- p_pass = pwd.value;
- var cnt=0,cnt2=1,cnt3=1;
- var temp="";
-
- for(i=0;i < p_pass.length;i++){
- temp_pass1 = p_pass.charAt(i);
- next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1;
- temp_p = p_pass.charAt(i+1);
- temp_pass2 = (parseInt(temp_p.charCodeAt(0)));
- if (temp_pass2 == next_pass)
- cnt2 = cnt2 + 1;
- else
- cnt2 = 1;
- if (temp_pass1 == temp_p)
- cnt3 = cnt3 + 1;
- else
- cnt3 = 1;
- if (cnt2 > 3) break;
- if (cnt3 > 3) break;
- }
- if (cnt3 > 3){
- pwd.value ="";
- pwd.focus();
- return false;
- }
- return pwd;
- }
- ]]>
-
-
-
- = 0) {
- value = field.options[si].value;
- }
- } else {
- value = field.value;
- }
-
- if (value.length > 0) {
-
- if (!isOK(value)) {
- bValid = false;
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
-
- } else {
- var iValue = parseInt(value);
- if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
- if (i == 0) {
- focusField = field;
- }
- fields[i++] = oInteger[x][1];
- bValid = false;
- }
- }
- }
- }
- }
- if (fields.length > 0) {
- focusField.focus();
- alert(fields.join('\n'));
- }
- return bValid;
- }
-
- function isOK(vv){
- if (vv >0) return true;
- else return false;
- }
- ]]>
-
-
-
-
-