in reply to Generic Entry widget validation

It looks like you got a good answer from zentara, I just want to add regarding the last question in your post:

Generally, there is a way to send arguments to Tk callbacks, for instance this example (from Mastering Tk):

foreach my $key ( qw/0 1 2 3 4 5 6 7 8 9/ ) { $mw->bind( "<Key-$key>" => [\&key, $key] ); $mw->bind( "<KP_$key>" => [\&key, $key] ); }
$key is an argument sent to the &key subroutine. Note that $key has a lexical binding, it is assigned when the foreach is executed.