Skip to main content
Module

x/enzastdlib/vendor/@jrylan-json-schema-typed.ts>Format

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
enum Format
import { Format } from "https://deno.land/x/enzastdlib@v0.0.4/vendor/@jrylan-json-schema-typed.ts";

This enum provides well-known formats that apply to strings.

Members

Date = "date"

A string instance is valid against this attribute if it is a valid representation according to the "full-date" production in RFC 3339.

DateTime = "date-time"

A string instance is valid against this attribute if it is a valid representation according to the "date-time" production in RFC 3339.

Duration = "duration"

A string instance is valid against this attribute if it is a valid representation according to the "duration" production.

Email = "email"

A string instance is valid against this attribute if it is a valid Internet email address as defined by RFC 5322, section 3.4.1.

Hostname = "hostname"

As defined by RFC 1123, section 2.1, including host names produced using the Punycode algorithm specified in RFC 5891, section 4.4.

IDNEmail = "idn-email"

A string instance is valid against this attribute if it is a valid Internet email address as defined by RFC 6531.

IDNHostname = "idn-hostname"

As defined by either RFC 1123, section 2.1 as for hostname, or an internationalized hostname as defined by RFC 5890, section 2.3.2.3.

IPv4 = "ipv4"

An IPv4 address according to the "dotted-quad" ABNF syntax as defined in RFC 2673, section 3.2.

IPv6 = "ipv6"

An IPv6 address as defined in RFC 4291, section 2.2.

IRI = "iri"

A string instance is valid against this attribute if it is a valid IRI, according to RFC 3987.

IRIReference = "iri-reference"

A string instance is valid against this attribute if it is a valid IRI Reference (either an IRI or a relative-reference), according to RFC 3987.

JSONPointer = "json-pointer"

A string instance is valid against this attribute if it is a valid JSON string representation of a JSON Pointer, according to RFC 6901, section 5.

JSONPointerURIFragment = "json-pointer-uri-fragment"

A string instance is valid against this attribute if it is a valid JSON string representation of a JSON Pointer fragment, according to RFC 6901, section 5.

RegEx = "regex"

This attribute applies to string instances.

A regular expression, which SHOULD be valid according to the ECMA-262 regular expression dialect.

Implementations that validate formats MUST accept at least the subset of ECMA-262 defined in the Regular Expressions section of this specification, and SHOULD accept all valid ECMA-262 expressions.

RelativeJSONPointer = "relative-json-pointer"

A string instance is valid against this attribute if it is a valid Relative JSON Pointer.

Time = "time"

A string instance is valid against this attribute if it is a valid representation according to the "time" production in RFC 3339.

URI = "uri"

A string instance is valid against this attribute if it is a valid URI, according to RFC3986.

URIReference = "uri-reference"

A string instance is valid against this attribute if it is a valid URI Reference (either a URI or a relative-reference), according to RFC3986.

URITemplate = "uri-template"

A string instance is valid against this attribute if it is a valid URI Template (of any level), according to RFC 6570.

Note that URI Templates may be used for IRIs; there is no separate IRI Template specification.

UUID = "uuid"

A string instance is valid against this attribute if it is a valid string representation of a UUID, according to RFC 4122.