Class RangeValidator
Represents a validator that validates that a field value is within a certain range.
Inheritance
System.Object
RangeValidator
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 RangeValidator : IFieldValidator
Constructors
RangeValidator(Nullable<Int32>, Nullable<Int32>, String)
Initializes a new instance of RangeValidator.
Declaration
public RangeValidator(int? min, int? max, string message = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | min | The minimum number for the range. |
System.Nullable<System.Int32> | max | The maximum naumber for the range. |
System.String | message | The custom error message for this validation. |
Properties
Max
The maximum number for the range.
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 for the range.
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. |