Skip to content

Commit

Permalink
Work around dateTime bug in Respect/Validation 2.3
Browse files Browse the repository at this point in the history
The DateTime::RFC3339 formats no longer work with valid RFC 3339
timestamps. See Respect/Validation#1442.
  • Loading branch information
oschwald committed Feb 1, 2024
1 parent b046112 commit a23246f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MinFraud/Validation/Rules/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public function __construct()
'time',
v::anyOf(
v::dateTime(\DateTime::RFC3339),
v::dateTime(\DateTime::RFC3339_EXTENDED)
v::dateTime(\DateTime::RFC3339_EXTENDED),
// Respect/Validation no longer correctly supports the RFC 3339
// formats as of 2.3. See
// https://github.com/Respect/Validation/issues/1442.
v::dateTime('Y-m-d\TH:i:sp'),
v::dateTime('Y-m-d\TH:i:s.vp'),
),
false
),
Expand Down

0 comments on commit a23246f

Please sign in to comment.