Skip to content

Commit

Permalink
Fixes ISO 8601 timestamp validation
Browse files Browse the repository at this point in the history
The regex used to perform timestamp validation fails to parse valid
timestamps that do not have fractional seconds (e.g. `2020-04-14T19:54:46Z`).

This change (1) updates the regex to account for this and (2) moves the regex
into a global variable so it lives in one place.

The new regex is sourced from Ch 4.7 in `Regular Expressions Cookbook` 2e
by Goyvaerts and Levithan.

note - From what I can tell Postman only allows strings in environment
variables so I cannot simply put the validation function there.
  • Loading branch information
sgg committed Apr 15, 2020
1 parent 958f0f1 commit 6f12044
Showing 1 changed file with 164 additions and 158 deletions.
Loading

0 comments on commit 6f12044

Please sign in to comment.