var AccountAdd = function () {

    var initForm = function () {
        var initFormCtrl = function () {
            bindEvent();
        };


        var bindEvent = function() {
            $("#phoneCodeForm").validate({
                rules: {
                	length: {
                        required: true,
                        htmlescape: true,
                        digits:true
                    },
                    content: {
                    	required: true,
                        htmlescape: true
                    }
                },
                messages: {
                	length: {
                        htmlescape: "请您不要输入特殊字符!"
                    },
                    content: {
                        htmlescape: "请您不要输入特殊字符!"
                    }
                },
                submitHandler: function (form) 
                {
                	var password;
                    var formdata = 
                    {
                    	length:$("#length").val(),
                    	content:$("#content").val()
                    };
                   // console.log(formdata);
                    formSubmit(formdata);
                }
        }); }

        initFormCtrl();
    };

    return {

        //main function to initiate the module
        init: function () {
            initForm();
        }

    };

}();