Show / Hide Table of Contents

Class ImageSizeValidator

Represents a validator that ensures that the image dimensions are within a certain range.

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

Constructors

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

Initializes a new instance of ImageSizeValidator.

Declaration
public ImageSizeValidator(int? minWidth, int? maxWidth, int? minHeight, int? maxHeight, string message = null)
Parameters
Type Name Description
System.Nullable<System.Int32> minWidth

The minimum width of the image.

System.Nullable<System.Int32> maxWidth

The maximum width of the image.

System.Nullable<System.Int32> minHeight

The minimum height of the image.

System.Nullable<System.Int32> maxHeight

The maximum height of the image.

System.String message

The custom error message for this validation.

Properties

MaxHeight

The maximum allowed height of the image (in px).

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

MaxWidth

The maximum allowed width of the image (in px).

Declaration
public int? MaxWidth { 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

MinWidth

The minimum allowed width of the image (in px).

Declaration
public int? MinWidth { 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