Jump to content

Want to set number of digits after the decimal point


heminfotech

Recommended Posts

I need to validate that the number should be in the format of the 00.00 and not 00.00..........

Pls. Any one know regarding JS function that can help me on this.

Thanks for all your support


Hello friends I want to edit this a bit Pls help me

My Criteria for checking the values are it must not be greater than 6 digits including decimal point "xxx.xx" this is ideal format but u can enter values like .00,0.00,00.00 etc I need to check that there must not be more than 2 digits after the decimal point .000 its wrong method how to validate this pls help me on this

thanks
Link to comment
Share on other sites

If you don't need it chopped off until the next page (if your submitting a form with it), you could use the PHP function "round", which comes with a way to leave a few desired decimals.  If you need an immediate change, I'm sure JS can do it, just not good enough with it to know how off the top of my head.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.