Class RuleBuilderInitialExtensions
- Namespace
- Cratis.Arc.Validation
- Assembly
- Cratis.Arc.Core.dll
Extensions for working with FluentValidation.IRuleBuilderInitial<T, TProperty>.
public static class RuleBuilderInitialExtensions
- Inheritance
-
RuleBuilderInitialExtensions
- Inherited Members
Methods
OverridePropertyName<T, TProperty>(IRuleBuilderInitial<T, TProperty>, string)
Overrides the property name for the rule.
public static IRuleBuilderInitial<T, TProperty> OverridePropertyName<T, TProperty>(this IRuleBuilderInitial<T, TProperty> ruleBuilder, string propertyName)
Parameters
ruleBuilderIRuleBuilderInitial<T, TProperty>The rule builder.
propertyNamestringThe property name to use.
Returns
- IRuleBuilderInitial<T, TProperty>
The same rule builder for chaining.
Type Parameters
TType of object being validated.
TPropertyProperty type.
Remarks
FluentValidation's own OverridePropertyName is a public extension on
FluentValidation.IRuleBuilderOptions<T, TProperty>. The concrete rule builder behind an
FluentValidation.IRuleBuilderInitial<T, TProperty> also implements that interface and returns itself, so this
simply forwards to it — avoiding the private-member reflection that NativeAOT and trimming cannot preserve.