Show / Hide Table of Contents

Class RegexBasedFormatValidator

Provides base functionality for regular-expression-based format validation.

Inheritance
System.Object
RegexBasedFormatValidator
DurationFormatValidator
EmailFormatValidator
HostNameFormatValidator
Ipv4FormatValidator
Ipv6FormatValidator
IriReferenceFormatValidator
JsonPointerFormatValidator
RelativeJsonPointerFormatValidator
UriReferenceFormatValidator
UuidReferenceFormatValidator
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 abstract class RegexBasedFormatValidator : IFormatValidator

Constructors

| Improve this Doc View Source

RegexBasedFormatValidator(String, Boolean)

Creates a new instance of the RegexBasedFormatValidator class.

Declaration
public RegexBasedFormatValidator(string pattern, bool isCaseSensitive = false)
Parameters
Type Name Description
System.String pattern

The regular expression for validation.

System.Boolean isCaseSensitive

Indicates whether the regular expression should consider case.

Properties

| Improve this Doc View Source

Format

Gets the format this validator handles.

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

SupportedBy

Gets the JSON Schema draft versions supported by this format.

Declaration
public abstract 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