Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My problem is 18 digits before decimal point and 2 digits after decimal point should display in textbox.
using javascript
Posted
Updated 11-Sep-12 22:47pm
v2

 
Share this answer
 
Hi,

you can use the regular expression for match with exact scale and precision of the number entered in th textbox.

check these links.
checking for decimal numbers[^]
Simple regular expression for a decimal with a precision of 2?[^]
JavaScript Decimal Place Restriction With RegEx[^]

for more on regular expression refer below link.
http://www.regular-expressions.info/[^]

hope it helps.
 
Share this answer
 

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