mercredi 6 novembre 2019

How do I ignore 0 value for price validation using pattern?

I have problem with my price validation (pattern-JavaScript).

My pattern does not accepts values that I want such as:

  • 101.00
  • 110.00
  • 1000.00
  • 0.50

My pattern accepts values such as:

  • 1.00
  • 1.10
  • 1.11
  • 11.11

Right now, my pattern is ^([1-9]+.)(\d{2})$

Aucun commentaire:

Enregistrer un commentaire