diff --git a/lib/types/string.js b/lib/types/string.js index a9b318e2e6f3a52cbcea52694919a02d38b86666..d6a9efa10db5c658a5401b4495e802a2e8224e26 100644 Binary files a/lib/types/string.js and b/lib/types/string.js differ diff --git a/spec/core/types/strings.json b/spec/core/types/strings.json index 5ca6bcf53f670277c73eff2e894ac7c8b31fb169..f589004167c2cf74574858022470ba4c7445333d 100644 --- a/spec/core/types/strings.json +++ b/spec/core/types/strings.json @@ -26,6 +26,40 @@ "pattern": "\\w+@\\w+\\.\\w+" }, "valid": true + }, + { + "description": "should handle format (core)", + "schema": { + "type": "object", + "properties": { + "a": { + "type": "string", + "format": "date-time" + }, + "b": { + "type": "string", + "format": "email" + }, + "c": { + "type": "string", + "format": "hostname" + }, + "d": { + "type": "string", + "format": "ipv4" + }, + "e": { + "type": "string", + "format": "ipv6" + }, + "f": { + "type": "string", + "format": "uri" + } + }, + "required": ["a", "b", "c", "d", "e", "f"] + }, + "valid": true } ] }