We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e903369 commit 193838aCopy full SHA for 193838a
fastjsonschema/draft04.py
@@ -18,7 +18,7 @@
18
class CodeGeneratorDraft04(CodeGenerator):
19
# pylint: disable=line-too-long
20
FORMAT_REGEXS = {
21
- 'date-time': r'^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)?$',
+ 'date-time': r'^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$',
22
'email': r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$',
23
'hostname': (
24
r'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*'
0 commit comments