TextValidator(3pm)
β¨ NAME β¨
okay so bestie, gather round β this is TextValidator(3pm), aka Wx::Perl::TextValidator β it's literally a Perl replacement for wxTextValidator. that's the whole vibe. π
πΈ SYNOPSIS πΈ
my $storage = '';
my $validator1 = Wx::Perl::TextValidator->new( '\d', \$storage );
my $validator2 = Wx::Perl::TextValidator->new( '[abcdef]' );
my $validator3 = Wx::Perl::TextValidator->new( qr/[a-zA-Z]/ );
my $textctrl = Wx::TextCtrl->new( $parent, -1, "", $pos, $size, $style,
$validator1 );
likeβ¦ look at her. three whole validators, three whole regexes, one Wx::TextCtrl that actually listens to you. we love a functional friendship. π«Ά
π¦ DESCRIPTION π¦
so Wx::Perl::TextValidator is a Wx::Validator subclass, and its whole job β her entire main character energy β is letting you filter user input to a Wx::TextCtrl. that's it. that's the gig. no cap. π
π METHODS π
my $validator1 = Wx::Perl::TextValidator->new( $regexp, \$storage );
my $validator2 = Wx::Perl::TextValidator->new( $regexp );
she constructs a brand new Wx::Perl::Validator. iconic behavior.
- the first argument has to be a regular expression that matches a single-character string, and it's the thing doing the actual work β validating the field contents and the user input. yes bestie, every keystroke is getting vibe checked. β
- the second argument, if you even bother to pass it, gets used in
TransferDataToWindow/TransferDataToWindowas the source/destination for the field's contents. it's the little storage goblin behind the scenes. π
fyi, the first argument can be a plain old string as well as a regular expression object made using qr//. so you have options. she's flexible like that. π
and that's the whole page, bestie β perl v5.42.3, dated 2026-08-20, straight outta the User Contributed Perl Documentation. go forth and validate, you gorgeous regex-wielding icon. πβ¨
π¦ where this page comes from
- ubuntu stonking: libwx-perl 1:0.9932-10build2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms