function ValidateIsDecial(sValue) {
	return (!sValue && !!!sValue && /^[0-9]{1,10}(\.[0-9]{0,2})?$/.test(sValue));
};

  验证 decimal(12,2)

 

小数点前允许10位,小数点后允许2位

1234567890 true

12345678901 false

0123456789 true

01234567891 false

123.11 true

123. true

123.123 false

 

相关文章:

  • 2021-08-28
  • 2021-07-13
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2021-10-22
  • 2021-09-22
  • 2021-10-12
  • 2021-07-12
  • 2022-01-23
相关资源
相似解决方案