Summary
Defines a validator on the current rule builder that ensures that the specific value is one of the values given in the list.
Syntax
public static IRuleBuilderOptions<T, TProperty> IsOneOf<T, TProperty>(this IRuleBuilder<T, TProperty> ruleBuilder, params string[] values)
Type Parameters
| Name |
Description |
| T |
Type of Enum being validated |
| TProperty |
Type of property being validated |
Parameters
| Name |
Type |
Description |
| ruleBuilder |
IRuleBuilder<T, TProperty> |
The rule builder on which the validator should be defined |
| values |
string[] |
The values to match against |
Return Value
| Type |
Description |
| IRuleBuilderOptions<T, TProperty> |
|