File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
main/java/com/networknt/schema
test/resources/tests/optional Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ private static class DraftV4 {
46
46
public static final List <Format > BUILTIN_FORMATS = new ArrayList <Format >();
47
47
static {
48
48
BUILTIN_FORMATS .add (pattern ("date-time" ,
49
- "^\\ d{4}-(?:0[0-9]{1}|1[0-2]{1})-(0?[1-9]|[12][0-9]|3[01])[tT ]\\ d{2}:\\ d{2}:\\ d{2}(\\ .\\ d+)?([zZ]|[+-]\\ d{2}:\\ d{2})$" ));
49
+ "^\\ d{4}-(?:0[0-9]{1}|1[0-2]{1})-(0?[1-9]|[12][0-9]|3[01])[tT ]\\ d{2}:\\ d{2}:\\ d{2}(\\ .\\ d+)?([zZ]? |[+-]\\ d{2}:\\ d{2})$" ));
50
50
BUILTIN_FORMATS .add (pattern ("date" , "^\\ d{4}-(?:0[0-9]{1}|1[0-2]{1})-(0?[1-9]|[12][0-9]|3[01])$" ));
51
51
BUILTIN_FORMATS .add (pattern ("time" , "^\\ d{2}:\\ d{2}:\\ d{2}$" ));
52
52
BUILTIN_FORMATS .add (pattern ("email" , "^\\ S+@\\ S+$" ));
Original file line number Diff line number Diff line change 24
24
"valid" : false
25
25
},
26
26
{
27
- "description" : " an invalid date-time string" ,
27
+ "description" : " an valid date-time string" ,
28
28
"data" : " 1963-12-31T08:30:06.283185Z" ,
29
29
"valid" : true
30
30
},
31
+ {
32
+ "description" : " an valid date-time string" ,
33
+ "data" : " 1963-12-30T08:30:06.283Z" ,
34
+ "valid" : true
35
+ },
36
+ {
37
+ "description" : " an valid date-time string" ,
38
+ "data" : " 1963-12-30T08:30:06.283" ,
39
+ "valid" : true
40
+ },
41
+ {
42
+ "description" : " an valid date-time string" ,
43
+ "data" : " 1963-12-30T08:30:06" ,
44
+ "valid" : true
45
+ },
46
+ {
47
+ "description" : " an valid date-time string" ,
48
+ "data" : " 1963-12-30T08:30:06Z" ,
49
+ "valid" : true
50
+ },
31
51
{
32
52
"description" : " only RFC3339 not all of ISO 8601 are valid" ,
33
53
"data" : " 2013-350T01:01:01" ,
You can’t perform that action at this time.
0 commit comments