<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0-preview.5.20278.1" />

System.ComponentModel.DataAnnotations.RangeAttribute

Specifies the numeric range constraints for the value of a data field.
public bool ConvertValueInInvariantCulture { get; set; }

Gets or sets a value that determines whether any conversions of the value being validated to OperandType as set by the type parameter of the #ctor constructor use the invariant culture or the current culture.

public object Maximum { get; }

Gets the maximum allowed field value.

public object Minimum { get; }

Gets the minimum allowed field value.

public Type OperandType { get; }

Gets the type of the data field whose value must be validated.

public bool ParseLimitsInInvariantCulture { get; set; }

Gets or sets a value that determines whether string values for Minimum and Maximum are parsed using the invariant culture rather than the current culture.

public RangeAttribute(int minimum, int maximum)

Initializes a new instance of the RangeAttribute class by using the specified minimum and maximum values.

public RangeAttribute(double minimum, double maximum)

Initializes a new instance of the RangeAttribute class by using the specified minimum and maximum values.

public RangeAttribute(Type type, string minimum, string maximum)

Initializes a new instance of the RangeAttribute class by using the specified minimum and maximum values and the specific type.