Class DurationFormatValidator
Handles duration
format validation by using a regular expression (ISO-8601 compatible).
Implements
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 DurationFormatValidator : RegexBasedFormatValidator, IFormatValidator
Remarks
The regular expression used is:
^(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$
Properties
| Improve this Doc View SourceFormat
Gets the format this validator handles.
Declaration
public override string Format { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceInstance
A singleton instance of the validator.
Declaration
public static IFormatValidator Instance { get; }
Property Value
Type | Description |
---|---|
IFormatValidator |
SupportedBy
Gets the JSON Schema draft versions supported by this format.
Declaration
public override JsonSchemaVersion SupportedBy { get; }
Property Value
Type | Description |
---|---|
JsonSchemaVersion |