一, 代码
{ pattern: /^[0-9]+\.[0-9]{ 2 }$/, message: "小数点后保留两位", trigger: "blur" }
二, 规则
来源: http://www.bubuko.com/infodetail-3149167.html