// 数值验证 jQuery.validator.addMethod("decimalsValue",function(value, element) { var decimalsValue =/^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/ ; return this.optional(element) || (decimalsValue.test(value)); }, "金额必须大于0并且只能精确到分");