The free Notepad used to be deficient in the regex department, but since version 6, it has been using the excellent PCRE engine—though the interface is still clunky.On OSX, the free Text Wrangler its big brother BBEdit both claim to use PCRE.In the latter case, we set rc to false, and also display an error message.When you play around with the function, you’ll notice that the validation function is only called when the focus leaves the field, so you have to click outside of the field to actually make that error message pop up.As I mentioned before, information is passed to the validation function in the event object, and in the code we see that the member ‘value’ is used to communicate the current value of the field.The member ‘rc’ (or return code) is used to communicate back if the validation was successful or not.Let’s take a look at how to do that with a text field that is only supposed to have a value of either ‘AAAA’ or ‘BBBB’ (yes, I know that this does not make much sense in a real PDF form).
If I've missed an important category, please shoot me a comment at the bottom of the page.
What they don't say is that the PCRE version they use is 4.0 from 17 February 2003—or so it appears to me, as it supports from 5.0.
This means that a lot of juicy features are missing.
I should hasten up to add that there really isn't anything "like" Directory Opus.
Opus is a unique tool—in my view the most important productivity tool a Windows user can have! Because for most users, an enormous amount of computer time disappears unnoticed in the black hole of file operations—looking for, moving and renaming files.
In that case, the previous value of the field is restored, and the user has to enter the data again.