Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Comments
bhagirathimfs 2-Jul-12 2:57am    
Can you Give one two example??For better clarification.

Use RangeValidator and set the MaximumValue and MinimumValue prorperty.
 
Share this answer
 
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[^]
 
Share this answer
 
@"^((\+|-)?(\d*))+((\.|,)\d{0,5})?$"; use this expression with minor changes in it, you should use regular expression validator for this purpose. and for the range, Use should use range validator.
 
Share this answer
 
Comments
phil.o 2-Jul-12 5:32am    
Using a regular expression to validate numeric values is a weird idea, imho.
Arjun YK 2-Jul-12 5:48am    
if so then what should be done imho?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900