|
This is the FAQ of the project gtk+widgexts
|
Does GtkxEntryMask allows regular expressions in mask and format?
In a future version it will undoubtly be added.
One proposal from Nathan Hurst was:
#define DIGIT "[0-9]"
#define ALPHA "[a-zA-Z]"
mask=ALPHA ALPHA "-" DIGIT DIGIT
The mask and format properties are intended to be set by users of glade, vdkbuilder, etc and I don't know how to handle this
Why doesn't GtkxEntryMask validate the text (dates, times, etc)
This is a fact. This widget doesn't prevent the editing of invalid dates. That is because if you paste a date or set a date from a database engine or delete some digits while editing, it is better to show the date as it is, rather than remove invalid characters. The validation of the date should be done somewhere out of this widget.
The same applies for example with telephone numbers. This widget only assures that you dont have extrange characters, but it can't decide if the telephone number is correct.