SettingConstraints Class#
Defines optional validation constraints for an extension setting.
All properties are nullable; a null value means the constraint is not applied.
public sealed record SettingConstraints : System.IEquatable<Verso.Abstractions.SettingConstraints>
Inheritance System.Object → SettingConstraints
Implements System.IEquatable<SettingConstraints>
Constructors#
SettingConstraints(Nullable<double>, Nullable<double>, string, IReadOnlyList<string>, Nullable<int>, Nullable<int>) Constructor#
Defines optional validation constraints for an extension setting.
All properties are nullable; a null value means the constraint is not applied.
public SettingConstraints(System.Nullable<double> MinValue=null, System.Nullable<double> MaxValue=null, string? Pattern=null, System.Collections.Generic.IReadOnlyList<string>? Choices=null, System.Nullable<int> MaxLength=null, System.Nullable<int> MaxItems=null);
Parameters#
MinValue System.Nullable<System.Double>
The minimum numeric value (inclusive). Applies to Integer and Double settings.
MaxValue System.Nullable<System.Double>
The maximum numeric value (inclusive). Applies to Integer and Double settings.
Pattern System.String
A regular expression pattern that the value must match. Applies to String settings.
Choices System.Collections.Generic.IReadOnlyList<System.String>
The set of allowed values. Applies to StringChoice settings.
MaxLength System.Nullable<System.Int32>
The maximum string length. Applies to String settings.
MaxItems System.Nullable<System.Int32>
The maximum number of items. Applies to StringList settings.
Properties#
Choices Property#
The set of allowed values. Applies to StringChoice settings.
public System.Collections.Generic.IReadOnlyList<string>? Choices { get; init; }
Property Value#
System.Collections.Generic.IReadOnlyList<System.String>
MaxItems Property#
The maximum number of items. Applies to StringList settings.
public System.Nullable<int> MaxItems { get; init; }
Property Value#
MaxLength Property#
The maximum string length. Applies to String settings.
public System.Nullable<int> MaxLength { get; init; }
Property Value#
MaxValue Property#
The maximum numeric value (inclusive). Applies to Integer and Double settings.
public System.Nullable<double> MaxValue { get; init; }
Property Value#
System.Nullable<System.Double>
MinValue Property#
The minimum numeric value (inclusive). Applies to Integer and Double settings.
public System.Nullable<double> MinValue { get; init; }
Property Value#
System.Nullable<System.Double>
Pattern Property#
A regular expression pattern that the value must match. Applies to String settings.
public string? Pattern { get; init; }