Show / Hide Table of Contents

Class DateTimeFormatValidator

Handles date-time format validation by attempting to parse against several formats (ISO-8601 compatible).

Inheritance
System.Object
DateTimeFormatValidator
Implements
IFormatValidator
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public class DateTimeFormatValidator : IFormatValidator
Remarks

The expected formats are:

  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ssK
  • yyyy'-'MM'-'dd'T'HH':'mm':'ss

Properties

| Improve this Doc View Source

Format

Gets the format this validator handles.

Declaration
public string Format { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Instance

A singleton instance of the validator.

Declaration
public static IFormatValidator Instance { get; }
Property Value
Type Description
IFormatValidator
| Improve this Doc View Source

SupportedBy

Gets the JSON Schema draft versions supported by this format.

Declaration
public JsonSchemaVersion SupportedBy { get; }
Property Value
Type Description
JsonSchemaVersion

Methods

| Improve this Doc View Source

Validate(JsonValue)

Validates a value.

Declaration
public virtual bool Validate(JsonValue value)
Parameters
Type Name Description
JsonValue value

The value to validate.

Returns
Type Description
System.Boolean

True if value matches the format; otherwise false.

Implements

IFormatValidator
  • Improve this Doc
  • View Source
Back to top Generated by DocFX