项目中有一栏位只能是0.xx 的两位小数。用正则表达式check :^0.[0-9]{2}$.
因为这个栏位非必填,采用asp.net 自带的RegularExpressionValidator在前台Check.RegularExpressionValidator只在有输入的情况下才起作用。
                    <asp:RegularExpressionValidator ID="revTFT" runat="server"  ControlToValidate = "txtTFTAfterThinning" ErrorMessage="*Format error,such as 0.XX"
                     ValidationExpression ="^0.[0-9]{2}$" Display ="Dynamic" >*Format error,such as 0.XX</asp:RegularExpressionValidator></td>

相关文章:

  • 2021-10-21
  • 2022-01-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2022-03-01
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案