We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d39c56a commit 325a0f8Copy full SHA for 325a0f8
src/JsonSchema/Rfc3339.php
@@ -4,7 +4,7 @@
4
5
class Rfc3339
6
{
7
- const REGEX = '/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d+)?(Z|([+-]\d{2}):?(\d{2}))/';
+ const REGEX = '/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d+)?(Z|([+-]\d{2}):?(\d{2}))$/';
8
9
/**
10
* Try creating a DateTime instance
tests/Constraints/FormatTest.php
@@ -150,6 +150,9 @@ public function getInvalidFormats()
150
array('00:00:60', 'time'),
151
array('25:00:00', 'time'),
152
153
+
154
+ array('invalid_value_2000-05-01T12:12:12Z', 'date-time'),
155
+ array('2000-05-01T12:12:12Z_invalid_value', 'date-time'),
156
array('1999-1-11T00:00:00Z', 'date-time'),
157
array('1999-01-11T00:00:00+100', 'date-time'),
158
array('1999-01-11T00:00:00+1:00', 'date-time'),
0 commit comments