0

Please any one help me achieve this, I need to implement validation for Amount Text field. Here's a regex need to allow allows 1-6 digits before and 1-2 digits after the dot. I had already try with these ways, but I didn't get the solution.

1) http://www.mpatric.com/2012-07-13-fomatting-ios-text-input-on-the-fly
2) regular expression in iOS

Community
  • 1
  • 1
Laxmi
  • 132
  • 1
  • 3
  • 12
  • Wow, I can't believe how many invalid and pointless edits have been made on this post... if it doesn't add anything, then don't edit it. It's fine as it is. – Sheridan Mar 06 '14 at 10:35

1 Answers1

1

I haven't worked on iOS before, so I don't know about iOS specific behavior for regexes. You could check if this works.

^(\d){1,6}\.(\d){1,2}$
divesh premdeep
  • 1,070
  • 3
  • 16
  • 28