Chapter 19 · 19.3
Checking input in a form: postcode, IBAN, phone number and date
Watch it in a short video
You create a registration form and get it back with a postcode without letters, an IBAN that is one digit short and a date of birth like "12/3". Then you have to phone people to check. With the right Format for each field, Euro-Office checks the input while it is being filled in, and the person filling it in gets a message straight away if something is wrong.
As an example, we create the registration form for the workshops of Bloemisterij Het Zonnetje. The basics of creating a form are explained in Creating a PDF form.
Please note: Euro-Office does not save fields that you add or change in a PDF automatically. Press Ctrl + S or click Save at the top left before you close the PDF; if you close it without saving, your new fields are gone. In our test (November 2026), a new field and its value were in the file in your WebOké Nextcloud within a few seconds of saving and closing. Feel free to open your form again afterwards to check that your fields and settings are still there.
Where do you set it?
- Open the PDF and choose Editing at the top right.
- Go to the Forms tab and place a Text Box on the page.
- Click the field. The Form settings appear on the right. If you don't see them, click the form settings icon on the far right.
- Give the field a clear name under Name, such as postcode.
- Under Format, choose what the input should look like.

The options under Format
| Format | What it does | Suitable for |
|---|---|---|
| None | Anything goes | Name, comment |
| Number | Only a number | Quantity, amount |
| Percentage | A number as a percentage | Discount |
| Date and Time | Only a date or time in the chosen notation | Date of birth, start time |
| Special | Fixed patterns such as ZIP Code and Phone Number | Please note: these are American patterns, see below |
| Regular expression | A custom pattern that you specify | Dutch postcode, IBAN, Dutch mobile number |
Be careful with Special
With Special, you choose from ZIP Code, ZIP Code + 4, Phone Number, Social Security Number and Arbitrary Mask in a second drop-down list. The first four are American patterns: ZIP Code expects five digits such as 90210, Phone Number expects an American number, and Social Security Number is the American format (three, two and four digits), not a European ID number such as the Dutch BSN. For European data, use a regular expression instead.

Arbitrary Mask: guiding what people type
The fifth option under Special, Arbitrary Mask, does work for Dutch data. You type a mask in the box below it: a 9 stands for a digit, an A for a letter, and other characters (such as a space) simply stay as they are. With the mask 9999 AA, the person filling in the form can only type a digit where a digit belongs and only a letter where a letter belongs. If someone types 38a1 12, only 3811 remains.
A mask only checks while someone is typing. It lets a half-completed postcode such as 3811 through without any message. If you want an incomplete value to be rejected, use a regular expression.
A Dutch postcode: with a regular expression
A regular expression is a short description of what the text should look like. You don't need to learn the language: just copy the patterns from the table below.
- Click the postcode field.
- Under Format, choose Regular expression.
- Type the pattern in the box below it: ^[1-9][0-9]{3} ?[A-Za-z]{2}$ and press Enter.
- Under Tip, add an example, such as "For example 3811 AB". The warning for incorrect input doesn't say what the right format is; the tip does.
- Tick Required if the postcode is mandatory.

Always use ^ at the start and $ at the end
Euro-Office checks whether the pattern occurs anywhere in the input. Without extra characters, the pattern for a Belgian postcode [1-9][0-9]{3} also accepts 02000, because it contains 2000. So put a ^ (caret) at the start and a $ (dollar sign) at the end: then the entire input must match the pattern. With ^[1-9][0-9]{3}$, 02000 is rejected and 2000 is accepted; with the postcode pattern above, 3811 ABC is rejected. (In the screenshot, the pattern is still shown without ^ and $.)
Patterns to copy
| Field | Pattern | Accepted | Rejected |
|---|---|---|---|
| Dutch postcode | ^[1-9][0-9]{3} ?[A-Za-z]{2}$ | 3811 AB, 3811AB | 12345, 3811 ABC |
| Belgian postcode | ^[1-9][0-9]{3}$ | 2000 | 02000 |
| Dutch mobile number | ^06[0-9]{8}$ | 0612345678 | 06-1234567 |
| Dutch IBAN | ^NL[0-9]{2} ?[A-Z]{4} ?([0-9]{4} ?){2}[0-9]{2}$ | NL91 ABNA 0417 1643 00 | NL91ABNA041716430 |
A date in day-month-year order
If you choose Date under Format, you pick the notation from a fixed list, and the field gets a small arrow for a calendar when it is filled in. That list starts with American notations such as m/d/yy (month first) and has no dd-mm-yyyy, the European day-month-year order in digits. You have two good options:

- dd-mmm-yyyy: day, abbreviated month and year. Clear, because the day and month can't be mixed up.
- yyyy-mm-dd: the international notation, such as 1990-12-31. Handy if you later sort the answers or put them in a spreadsheet.
Do you really want 31-12-1990? Then don't choose Date under Format, but Regular expression with the pattern ^(0[1-9]|[12][0-9]|3[01])-(0[1-9]|1[0-2])-(19|20)[0-9]{2}$. The field then has no calendar, but only accepts a date such as 31-12-1990; 12/31/1990 is rejected. Under Tip, add "dd-mm-yyyy" as an example.
Please note: if you leave the default notation m/d/yy in place, the field rejects a date such as 31-12-1990 with a message saying the value must match the format "m/d/yy". So always choose a notation deliberately.
Required fields and maximum length
- Tick Required for fields that must always be filled in. Such a field is shown in a darker colour when the form is filled in, so the person filling it in can see it is mandatory.
- With Characters limit you set a maximum number of characters, for example 18 for a Dutch IBAN without spaces.
Testing: what the person filling in the form sees
- Choose Commenting at the top right; in this mode you fill in the form, just like the recipient.
- Type an incorrect value in the postcode field, such as 12345, and press Tab.
- Euro-Office shows a Warning: "Invalid value for field" with the name of the field. So give your fields a clear Name, because that is what the person filling in the form sees here.
- Click OK, type 3811 AB and press Tab: now it goes through without a message.
Tip: the warning only appears when you move to another field with Tab. If there is only one field on the page, nothing happens when you press Tab and you won't see a message. So for testing, place at least a second field on the form.

Pitfalls
- Format is not a check on authenticity: the IBAN pattern checks whether the input looks like a Dutch IBAN, not whether the account number exists or the check digits are correct.
- Don't be too strict: a pattern for a Dutch postcode shuts out people filling in the form from Belgium or Germany. If you also work with customers from other countries, make the field more flexible or add a separate Country field.
- Spaces and capitals: [A-Z] only allows capital letters. If you also want to allow lower-case letters, use [A-Za-z] as in the postcode pattern.
- Always test with a correct and an incorrect value before you send out the form.
