Class MimeTypeValidator
Represents a validator that validates that an asset is of a certain MimeTypeRestriction
Inheritance
System.Object
MimeTypeValidator
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 MimeTypeValidator : IFieldValidator
Constructors
MimeTypeValidator(IEnumerable<MimeTypeRestriction>, String)
Initializes a new instance of MimeTypeValidator.
Declaration
public MimeTypeValidator(IEnumerable<MimeTypeRestriction> mimeTypes, string message = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<MimeTypeRestriction> | mimeTypes | The mime type groups to validate against. |
System.String | message | The custom error message for this validation. |
Properties
Message
The custom error message that should be displayed.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MimeTypes
The mime type groups to validate against.
Declaration
public List<MimeTypeRestriction> MimeTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<MimeTypeRestriction> |
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. |