Show / Hide Table of Contents

Class SizeValidator

Represents a validator that validates that an array of items conforms to a certain size.

Inheritance
System.Object
SizeValidator
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 SizeValidator : IFieldValidator

Constructors

SizeValidator(Nullable<Int32>, Nullable<Int32>, String)

Initializes a new instance of SizeValidator.

Declaration
public SizeValidator(int? min, int? max, string message = null)
Parameters
Type Name Description
System.Nullable<System.Int32> min

The minimum number of items in the array.

System.Nullable<System.Int32> max

The maximum number of items in the array.

System.String message

The custom error message for this validation.

Properties

Max

The maximum number of items in the array.

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

Message

The custom error message that should be displayed.

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

Min

The minimum number of items in the array.

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

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