• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Regex for decimal

Regex for decimal 12 years 7 months ago #14928

  • linku2nz
  • linku2nz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
I've scoured the net for a regex expression that I can use to validate decimal values for RSForm!Pro but have just got myself utterly confused. :sick: :unsure: :dry:

Something along the lines of:

^[0-9]+(\.[0-9]{1,2})?$

... but I also want it to trap non-numeric input, so ...

VALID:
12.34
01.10
1.1
1,234.55

INVALID:
34.1234
$44.33
34.45USD
-34.99

Basically two decimal points, not zero, positive, allows leading or trailing zeros, thousands (comma) but no non-numeric characters ...

Help!!! BTW - I'd have thought this would be a fairly common requirement for RSForms!

Adam.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!