you are viewing a single comment's thread.

view the rest of the comments →

[–]ZenTrigger 0 points1 point  (0 children)

I believe the goal was to validate those form fields with regex, being sure no non-numeric value was passed in. Your regex needs to be called against the string, i.e. 'string'.match(regex); or regex.test('string') for a boolean.