Thread: Decimal check
View Single Post
Old November 25th, 2004, 11:51 AM
Nitin_sharma Nitin_sharma is offline
Authorized User
Join Date: Sep 2004
Location: West Midlands, , United Kingdom.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Nitin_sharma Send a message via Yahoo to Nitin_sharma

Hi Chris,
The function which you mentioned:
function CheckDecimal(pNum, pDp){
    return new RegExp("^\\d*\\.\\d{0," + pDp + "}$").test(pNum);

Since I need two decimal places does that infer that pdp = 2
and what does "d" stand in RegExp .
Is test and RegExp inbuilt functions in JavaScript.
Waiting for reply.