Chapter 19 · 19.3
Checking input in a form: postcode, IBAN, phone number and date
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 call people back. With the right Format for each field, Euro-Office checks the input while the form is being filled in, and the person filling it in gets a message straight away if something is wrong.
As an example, we'll create the registration form for the workshops of Bloemisterij Het Zonnetje. The basics of creating a form are covered in Creating a PDF form.
Please note: Euro-Office doesn't save fields 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 Edit 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 US patterns, see below |
| Regular expression | Your own pattern that you enter | 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 US patterns: ZIP Code expects five digits such as 90210, Phone Number expects an American number, and Social Security Number is the American social security number (three, two and four digits). For Dutch data, you therefore use a regular expression.

Arbitrary Mask: guiding the typing
The fifth option under Special, Arbitrary Mask, is useful 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) are shown 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, 3811 remains.
A mask only checks while typing. It simply accepts a half-completed postcode such as 3811, without a 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 correct input is; the tip does.
- Tick Required if the postcode is mandatory.

Always with ^ 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 image, the pattern is still shown without ^ and $.)
Patterns to copy
| Field | Pattern | Good | Error |
|---|---|---|---|
| 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 British notation
If you choose Date under Format, you pick the notation from a fixed list, and the field gets an arrow for a calendar when it's filled in. That list starts with American notations such as m/d/yy (month first) and has no day-first notation with numbers only, such as dd/mm/yyyy. You have two good options:

- dd-mmm-yyyy: day, month as an abbreviation 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 sort the answers later or put them in a spreadsheet.
Do you really want 31/12/1990? Then under Format, don't choose Date 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 like 31/12/1990; 12/31/1990 is rejected. Add "dd/mm/yyyy" under Tip as an example.
Please note: if you leave the default notation m/d/yy, the field rejects a British date such as 31/12/1990 with the message that 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 gets a darker colour when the form is being filled in, so the person filling it in can see that it's mandatory.
- With Characters limit, you set a maximum number of characters, for example 22 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 the person filling in the form sees it here.
- Click OK, type 3811 AB and press Tab: now it goes through without a message.

Pitfalls
- Format is not a check of 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.
- Not 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 abroad, make the field broader or add a separate Country field.
- Spaces and capitals: [A-Z] only allows capital letters. If you also want lowercase 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.
