PriceStepAttribute
Ecng.ComponentModel
Validates that a Price value lies on a discrete grid defined by Base + n * Step using Value.
Hereda de: StepAttribute
Implementa: IValidator
Constructores
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.
Devuelve: True if the value is valid; otherwise, false.