Show / Hide Table of Contents

Class LinkContentTypeValidator

Represents a validator that validates what type of ContentType you can link to from a field.

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

Constructors

LinkContentTypeValidator(IEnumerable<ContentType>, String)

Initializes a new instance of LinkContentTypeValidator.

Declaration
public LinkContentTypeValidator(IEnumerable<ContentType> contentTypes, string message = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentType> contentTypes

The content types to restrict to.

System.String message

The custom error message for this validation.

LinkContentTypeValidator(IEnumerable<String>, String)

Initializes a new instance of LinkContentTypeValidator.

Declaration
public LinkContentTypeValidator(IEnumerable<string> contentTypeIds, string message = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> contentTypeIds

The content type ids to restrict to.

System.String message

The custom error message for this validation.

LinkContentTypeValidator(String, String[])

Initializes a new instance of LinkContentTypeValidator.

Declaration
public LinkContentTypeValidator(string message = null, params string[] contentTypeIds)
Parameters
Type Name Description
System.String message

The custom error message for this validation.

System.String[] contentTypeIds

The content types to restrict to.

Properties

ContentTypeIds

The id of the content types allowed.

Declaration
public List<string> ContentTypeIds { get; set; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

Message

The custom error message that should be displayed.

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

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