Home Validation Rules Value in Range Rule
Post
Cancel

Value in Range Rule

This rule checks if a given value is present in a range.

Example

This example to ensure an input Integer value is in a range of [1, 2, 3]

1
2
3
4
5
// pass the items of the range
RangeValidationRule<int?>.FromRange(1, 2, 3 ); 

// Or create a range from a collection
RangeValidationRule<int?>.FromRangeCollection(new int?[] { 1, 2, 3 });