text: $.validator.setDefaults({
      highlight: function(e) {
          $(e).closest(".form-group").removeClass("has-success").addClass("has-error")
      },
      success: function(e) {
          e.closest(".form-group").removeClass("has-error").addClass("has-success")
      },
      errorElement: "span",
      errorPlacement: function(e, r) {
          e.appendTo(r.is(":radio") || r.is(":checkbox") ? r.parent().parent().parent() : r.parent())
      },
      errorClass: "help-block m-b-none",
      validClass: "help-block m-b-none"
  }),
  $().ready(function() {
      $("#commentForm").validate();
      var e = "<i class='fa fa-times-circle'></i> ";
      $("#signupForm").validate({
          rules: {
              firstname: "required",
              lastname: "required",
              username: {
                  required: !0,
                  minlength: 3
              },
              role_name: {
                  required: !0,
                  minlength: 2
              },
              per_name: {
                  required: !0,
                  minlength: 2
              },
              urls: {
                  required: !0,
              },
              cid: {
                  required: !0,
              },
              title: {
                  required: !0,
                  minlength: 5,
                  maxlength: 100 
              },
              author: {
                  required: !0,
                  minlength: 3,
                  maxlength: 25
              },
              saying: {
                  required: !0,
                  minlength: 10,
                  maxlength: 150
              },
              describe: {
                  required: !0,
                  minlength: 10,
                  maxlength: 200
              },
              password: {
                  required: !0,
                  minlength: 5
              },
              confirm_password: {
                  required: !0,
                  minlength: 5,
                  equalTo: "#password"
              },
              email: {
                  required: !0,
                  email: !0
              },
              topic: {
                  required: "#newsletter:checked",
                  minlength: 2
              },
              agree: "required"
          },
          messages: {
              firstname: e + "请输入你的姓",
              lastname: e + "请输入您的名字",
              username: {
                  required: e + "请输入您的用户名",
                  minlength: e + "用户名必须两个字符以上"
              },
              role_name: {
                  required: e + "请输入您的角色名称",
                  minlength: e + "角色名称必须一个字符以上"
              },
              per_name: {
                  required: e + "请输入您的权限名称",
                  minlength: e + "权限名称必须一个字符以上"
              },
              urls: {
                  required: e + "请输入您的url地址",
              },
              cid: {
                  required: e + "请选择您的分类",
              },
              title: {
                  required: e + "请输入您的详情标题",
                  minlength: e + "详情标题必须四个字符以上",
                  maxlength: e + "详情标题不得多于一百个字符",
              },
              author: {
                  required: e + "请输入您的详情作者",
                  minlength: e + "详情作者必须两个字符以上",
                  maxlength: e + "详情作者不得多于二十五个字符"
              },
              saying: {
                  required: e + "请输入您的详情语录",
                  minlength: e + "详情语录必须九个字符以上",
                  maxlength: e + "详情语录不得多于一百五十个字符"
              },
              describe: {
                  required: e + "请输入您的详情描述",
                  minlength: e + "详情描述必须九个字符以上",
                  maxlength: e + "详情描述不得多于二百个字符"
              },
              password: {
                  required: e + "请输入您的密码",
                  minlength: e + "密码必须5个字符以上"
              },
              confirm_password: {
                  required: e + "请再次输入密码",
                  minlength: e + "密码必须5个字符以上",
                  equalTo: e + "两次输入的密码不一致"
              },
              email: e + "请输入您的E-mail",
              agree: {
                  required: e + "必须同意协议后才能注册",
                  element: "#agree-error"
              }
          }
      })
  });