38 size_t numberOfErrors = 0;
40 const std::vector<std::pair<std::string,
bool>> dateTimeChecks{
41 {
"1985-04-12T23:20:50.52Z",
true},
42 {
"1996-12-19T16:39:57-08:00",
true},
43 {
"1990-12-31T23:59:60Z",
true},
44 {
"1990-12-31T15:59:60-08:00",
true},
45 {
"1937-01-01T12:00:27.87+00:20",
true},
46 {
"1985-4-12T23:20:50.52Z",
false},
47 {
"1985-04-12T23:20:50.52",
false},
48 {
"1985-04-12T24:00:00",
false},
50 {
"2019-04-30T11:11:11+01:00",
true},
51 {
"2019-04-31T11:11:11+01:00",
false},
52 {
"2019-02-28T11:11:11+01:00",
true},
53 {
"2019-02-29T11:11:11+01:00",
false},
54 {
"2020-02-29T11:11:11+01:00",
true},
55 {
"2020-02-30T11:11:11+01:00",
false},
56 {
"2020-02-29T23:59:59+01:00",
true},
57 {
"2020-02-29T23:59:60+01:00",
false},
58 {
"2020-02-29T23:59:60+00:00",
true},
59 {
"2020-02-29T23:60:59+01:00",
false},
60 {
"2019-09-30T11:11:11+01:00",
true},
61 {
"2019-09-31T11:11:11+01:00",
false},
62 {
"2019-09-30T11:11:11+23:59",
true},
63 {
"2019-09-30T11:11:11+24:00",
false}};
67 const std::vector<std::pair<std::string,
bool>> ipv4Checks{
69 {
"x99.99.99.99",
false},
70 {
"99.99.99.99x",
false},
71 {
"192.168.0.1",
true},
74 {
"127.0.0.0.1",
false},
75 {
"255.255.255.255",
true},
76 {
"255.255.255.256",
false},
77 {
"255.255.256.255",
false},
78 {
"255.256.255.255",
false},
79 {
"256.255.255.255",
false},
80 {
"256.256.256.256",
false},
81 {
"0x7f000001",
false}};
85 const std::vector<std::pair<std::string,
bool>> uriChecks{
86 {
"http://www.google.com/search?q=regular%20expression",
true},
87 {
"http://www.google.com/",
true},
88 {
"http://www.google.com/search?q=regular%20expression",
true},
89 {
"www.google.com",
false},
90 {
"http://www.google.comj",
true},
91 {
"ldap://[2001:db8::7]/c=GB?objectClass?one",
true},
92 {
"mailto:John.Doe@example.com",
true},
93 {
"news:comp.infosystems.www.servers.unix",
true},
94 {
"https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top",
true},
95 {
"tel:+1-816-555-1212",
true},
96 {
"telnet://192.0.2.16:80/",
true},
97 {
"urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
true}};
101 return numberOfErrors;