18 instantiations of LengthAttribute
Shared.Tests (18)
Data.Validation\LengthAttributeTests.cs (18)
17[Length(5)] 20[Length(5, 7)] 73[Length(5, Exclusive = true)] 76[Length(5, 7, Exclusive = true)] 145[Length(5)] 148[Length(5, 7)] 202[Length(5)] 205[Length(5, 7)] 252[Length(5)] 255[Length(5, 7)] 309[Length(5)] 315[Length(-1)] 321[Length(5, 10)] 327[Length(10, 5)] 333[Length(-5, -10)] 371var attr = new LengthAttribute(5); 381[Length(5, ErrorMessage = "My custom message for '{0}'.")] 401[Length(5)]
6 references to LengthAttribute
Shared (5)
Data.Validation\LengthAttribute.cs (5)
50/// Initializes a new instance of the <see cref="LengthAttribute"/> class. 64/// Initializes a new instance of the <see cref="LengthAttribute"/> class. 98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
Shared.Tests (1)
Data.Validation\LengthAttributeTests.cs (1)
371var attr = new LengthAttribute(5);