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 authored and geromegrignon committed Dec 27, 2021
1 parent a3855ae commit caf8ec9
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions api/Conduit.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -117,7 +117,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -179,7 +179,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -237,7 +237,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -295,7 +295,7 @@
}
},
"response":[

]
}
]
Expand Down Expand Up @@ -375,7 +375,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -456,7 +456,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -537,7 +537,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -618,7 +618,7 @@
}
},
"response":[

]
}
]
Expand Down Expand Up @@ -693,7 +693,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -773,7 +773,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -852,7 +852,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -931,7 +931,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1016,7 +1016,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1101,7 +1101,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1169,7 +1169,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1250,7 +1250,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1320,7 +1320,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1391,7 +1391,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1469,7 +1469,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1547,7 +1547,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1617,7 +1617,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1682,7 +1682,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1752,7 +1752,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1818,7 +1818,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1857,7 +1857,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -1894,7 +1894,7 @@
}
},
"response":[

]
}
],
Expand Down Expand Up @@ -1977,7 +1977,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -2043,7 +2043,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -2111,7 +2111,7 @@
}
},
"response":[

]
},
{
Expand Down Expand Up @@ -2179,7 +2179,7 @@
}
},
"response":[

]
}
]
Expand Down Expand Up @@ -2237,7 +2237,7 @@
}
},
"response":[

]
}
]
Expand Down

0 comments on commit caf8ec9

Please sign in to comment.