Drawloop - Validating Currency in Drawloop Forms

  • 15 February 2022
  • 0 replies
  • 14 views

Badge +8

Topic

How to validate currency using regular expressions (RegEx) in Drawloop Forms.

 

Instructions

Use one of the following expressions:
  • Requires a decimal and commas:
    ^$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)?.[0-9]{1,2}$
  • Allows a decimal, requires commas:
    (?=.)^$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)?(.[0-9]{1,2})?$
  • Decimal and commas optional:
    (?=.)^$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|[0-9]+)?(.[0-9]{1,2})?$
  • Decimals required, commas optional:
    ^$?(([1-9][0-9]{0,2}(,[0-9]{3})*)|[0-9]+)?.[0-9]{1,2}$

Related Links


0 replies

Be the first to reply!

Reply