Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27512

problem in validation fix number and decimal numbers

$
0
0
hi
I use following regular expression to validate my numbers:
Code:

^[-]?\d{1,15}(\.\d{1,3})?
my validate numbers is :

Code:

0 to 9 max length <= 15
decimal numbers are optional and decimal place is <= 3 example : 1234.123
0.123

my invalidate numbers is :

Code:

0 to 9 max length > 15
decimal numbers are optional and decimal place is > 3 example : 1234.12345
1234.
.1234
0.0
1.0
1.00
1.000


4 last invalid number don't validate by my regex
how I can fix my regular expression that (0.0 , 1.0, ..) can be invalid ?

sorry for may bad English

Viewing all articles
Browse latest Browse all 27512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>