PriceValidationAttributeBase
Ecng.ComponentModel
Base validation attribute for Price that validates only the Value component.
継承元: ValidationAttribute
実装: IValidator
プロパティ
AcceptNull
protected virtual bool AcceptNull { get; }
value = priceValidationAttributeBase.AcceptNull
Gets a value indicating whether null price values are always accepted (independently of DisableNullCheck).
DisableNullCheck
public bool DisableNullCheck { get; set; }
value = priceValidationAttributeBase.DisableNullCheck
priceValidationAttributeBase.DisableNullCheck = value
If true, null values are treated as valid (only for attributes where null is not unconditionally allowed).
メソッド
IsValid
public override bool IsValid(object value)
result = priceValidationAttributeBase.IsValid(value)
Validates the specified value by converting it and applying the custom validation.
- value
- The value to validate.
戻り値: True if the value is valid; otherwise, false.
Validate
protected abstract bool Validate(decimal value)
result = priceValidationAttributeBase.Validate(value)
Core validation over the numeric price value (already extracted).
- value
- Price numeric value.