Regular expression to validate two decimal places

First, the code

{
  pattern: /^[0-9]+\.[0-9]{2}$/,
  message: "two decimal places"
  trigger: "blur"
}
Second, the rule

 

Guess you like

Origin www.cnblogs.com/heroljy/p/11326382.html