Show / Hide Table of Contents

Class FileSizeValidator

Represents a validator that ensures that the media file size is within a certain size range.

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

Constructors

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

Initializes a new instance of FileSizeValidator.

Declaration
public FileSizeValidator(int? min, int? max, string minUnit = "Bytes", string maxUnit = "Bytes", string message = null)
Parameters
Type Name Description
System.Nullable<System.Int32> min

The minimum size of the file.

System.Nullable<System.Int32> max

The maximum size of the file.

System.String minUnit

The unit measuring the minimum file size.

System.String maxUnit

The unit measuring the maximum file size.

System.String message

The custom error message for this validation.

Properties

Max

The maximum allowed size of the file.

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 allowed size of the file.

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