2位小数正则表达式

项目中有一栏位只能是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>

posted on 2009-08-26 10:46  AndyCai  阅读(4125)  评论(0编辑  收藏  举报

导航