MinValueValidationRule
struct · ferroui-xaml-interactions-custom · v0.5.0
struct MinValueValidationRule
Validation rule that checks that a value is greater than or equal to a minimum value.
Deviation (DEVIATIONS.md, Behaviors): the reference class is generic over the type T of the
value (MinValueValidationRule<T>, created in markup with x:TypeArguments); classes of the
class model are not generic, so the minimum is an untyped value, compared with the validated
value by the ordering of untyped values (ValueTypes::compare, which converts the minimum to
the type of the value: a minimum given as text in markup compares as a number with a number).
An unset minimum is null (the reference's default of a value type T is its zero), and values
that do not compare are not valid (the comparer of the reference throws).
Members
TYPEto_refmin_value_propertyerror_message_propertyconstructnewmin_valueset_min_valueerror_messageset_error_messagevalidate
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MinValueValidationRule>
Returns a strong reference to this object.
min_value_property
fn min_value_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the MinValue property.
error_message_property
fn error_message_property() -> &'static StyledProperty<Option<String>>
Identifies the ErrorMessage property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a rule.
min_value
fn min_value(self: &Self) -> Option<BoxedValue>
Gets or sets the minimum value. This is a property of the object model.
set_min_value
fn set_min_value(self: &Self, value: Option<BoxedValue>)
error_message
fn error_message(self: &Self) -> Option<String>
Gets or sets the error message for failed validation. This is a property of the object model.
set_error_message
fn set_error_message(self: &Self, value: Option<String>)
validate
fn validate(self: &Self, value: Option<&BoxedValue>) -> bool
Validates the specified value: valid when it is not null and not below the minimum.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<MinValueValidationRule>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplIValidationRule
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.