PriceStepAttribute
Ecng.ComponentModel
Validates that a Price value lies on a discrete grid defined by Base + n * Step using Value.
Herda de: StepAttribute
Implementa: IValidator
Construtores
PriceStepAttribute
public PriceStepAttribute(decimal step, decimal baseValue)
priceStepAttribute = PriceStepAttribute(step, baseValue)
Validates that a Price value lies on a discrete grid defined by Base + n * Step using Value.
- step
- Positive step.
- baseValue
- Base value (default 0).
Métodos
IsValid
public override bool IsValid(object value)
result = priceStepAttribute.IsValid(value)
Validates the specified value by converting it and applying the custom validation.
- value
- The value to validate.
Retorna: True if the value is valid; otherwise, false.