金额验证表达式 [英] amount validation expression

查看:121
本文介绍了金额验证表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有用于金额验证表达式的要求.
请发送给我amount的validationexpression.我要接受最低100卢比,并且文本框大小为8位数字,并且不接受0和多个零.
Thankyou

hi all,
I have requirement that is for amount validation expression.
Please send me the validationexpression of amount.i want to accept 100 rupees minimum and amount textbox size is 8 digits and don''t accept 0, and multiple zero''s.
thankyou

推荐答案

使用RangeValidator并设置MaximumValue和MinimumValue属性.
Use RangeValidator and set the MaximumValue and MinimumValue prorperty.


发送给我金额的验证表达式.
您有尝试过什么吗?
要求代码而不花力气不是一个好习惯.

这是询问者的期望:
1. 先尝试您要做什么!您可能会发现它并不难.
2.制定看起来像问题/无法解决的问题.



现在,看看如何使用正则表达式来满足您的需求.
以下文章应该会有所帮助: MSDN:如何:使用正则表达式来约束ASP.NET中的输入 [ ^ ]
Please send me the validationexpression of amount.
Did you try anything at all?
Asking for code without showing any effort is not a good practice.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.



For now, look on how you can use Regular Expressions for your requirement.
Following article should help: MSDN: How To: Use Regular Expressions to Constrain Input in ASP.NET[^]


@"^((\ + |-)?(\ d *))+((\.|,)\ d {0,5})?
@"^((\+|-)?(\d*))+((\.|,)\d{0,5})?


这篇关于金额验证表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆