Show / Hide Table of Contents

Class DateRangeValidator

Represents a validator that ensures that the field value is within a certain date range.

Inheritance
System.Object
DateRangeValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:Contentful.Core.Models.Management
Assembly:cs.temp.dll.dll
Syntax
public class DateRangeValidator : IFieldValidator

Constructors

DateRangeValidator(String, String, String)

Initializes a new instance of DateRangeValidator.

Declaration
public DateRangeValidator(string min, string max, string message = null)
Parameters
Type Name Description
System.String min

The minimum date of the range.

System.String max

The maximum date of the range.

System.String message

The custom error message for this validation.

Properties

Max

The maximum allowed date.

Declaration
public DateTime? Max { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

Message

The custom error message that should be displayed.

Declaration
public string Message { get; set; }
Property Value
Type Description
System.String

Min

The minimum allowed date.

Declaration
public DateTime? Min { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

Methods

CreateValidator()

Creates a representation of this validator that can be easily serialized.

Declaration
public object CreateValidator()
Returns
Type Description
System.Object

The object to serialize.

Implements
IFieldValidator.CreateValidator()
Back to top Copyright © 2015-2016 Contentful
Generated by DocFX