반응형

참조 : http://love2u.be/40

JqueryValidation.zip

+ jquery-1.4.2.min.js

+ jquery.validate.js

+ validation.js (예제)

Validation EX

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$(document).ready(function() {
    $("#joinForm").validate({
        rules: {
            name:{required: true, minlength: 2, maxlength: 4, kor_eng: true},
            age :{required: true, minlength: 1, maxlength: 2, number: true},
            job :{required: true, minlength: 3, maxlength: 20},
            address :{required: true, minlength: 3, maxlength: 20},                    
        },
        messages: {
            name: {required: "이름을 입력하세요",minlength: jQuery.format("{0}자리 이상"),maxlength: jQuery.format("{0}자리 이하"), kor_eng: "한글과 영문만 가능"},
            age : {required: "나이를 입력하세요",minlength: jQuery.format("{0}자리 이상"),maxlength: jQuery.format("{0}자리 이하"), number: "숫자만 가능"},
            job : {required: "직업을 입력하세요",minlength: jQuery.format("{0}자리 이상"),maxlength: jQuery.format("{0}자리 이하")},
            address: {required: "주소를 입력하세요",minlength: jQuery.format("{0}자리 이상"),maxlength: jQuery.format("{0}자리 이하")},
        },
        success: function(label) {
            label.html(" ").addClass("checked");
        }
    });
});
cs


반응형

'IT > 언어' 카테고리의 다른 글

정규 표현식 예제  (0) 2014.05.21
Servlet 에러 페이지 처리  (0) 2014.05.21
tomcat7 SSL 설정  (0) 2014.05.19
[LIB] STRUT2  (0) 2014.05.19
[LIB] JSON  (0) 2014.05.19
반응형
반응형

'IT > 언어' 카테고리의 다른 글

Servlet 에러 페이지 처리  (0) 2014.05.21
Jquery validation  (0) 2014.05.21
[LIB] STRUT2  (0) 2014.05.19
[LIB] JSON  (0) 2014.05.19
BSON encode/decode  (0) 2014.05.15
반응형

STRUTS2 사용시 필요한 최소 LIB


struts2.zip

+ commons-fileupload-1.3.1

+ commons-io-2.2

+ commons-lang-2.4

+ commons-lang3-3.1

+ commons-logging-1.1.3

+ commons-logging-api-1.1

+ commons-validator-1.3.1

+ freemarker-2.3.19

+ javassist-3.11.0.GA

+ ognl-3.0.6

+ struts2-core-2.3.16.3

+ struts-core-1.3.10

+ xwork-core-2.3.16.3

반응형

'IT > 언어' 카테고리의 다른 글

Jquery validation  (0) 2014.05.21
tomcat7 SSL 설정  (0) 2014.05.19
[LIB] JSON  (0) 2014.05.19
BSON encode/decode  (0) 2014.05.15
BSON 이해하기  (0) 2014.05.14

+ Recent posts