RegexValidationRule
struct · ferroui-xaml-interactions-custom · v0.5.0
struct RegexValidationRule
Validation rule that checks that a string matches a regular expression.
Deviation (DEVIATIONS.md, Behaviors): the pattern is a pattern of the regex crate, whose
syntax is that of the reference's regular expressions without look-around and
back-references; a pattern that does not compile matches nothing (the reference throws).
Members
TYPEto_refpattern_propertyerror_message_propertyconstructnewpatternset_patternerror_messageset_error_messagevalidate
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RegexValidationRule>
Returns a strong reference to this object.
pattern_property
fn pattern_property() -> &'static StyledProperty<String>
Identifies the Pattern 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.
pattern
fn pattern(self: &Self) -> String
Gets or sets the regular expression pattern. This is a property of the object model.
set_pattern
fn set_pattern(self: &Self, value: String)
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 a text that matches the pattern.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<RegexValidationRule>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplIValidationRule
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.