Validators
All 13 built-in format checks for Text fields, with accepted and rejected example inputs, the six that need a setting, the seven supported postal-code countries, and every rejection you can hit.
A validator is an optional extra format check you attach to a Text field at definition time, so a value in the wrong shape is refused the moment somebody tries to save it instead of quietly becoming bad data that surfaces months later. You pick one of 13 built-in checks from a dropdown, and seven of them need no further setting.
Why there is no pattern box
There is deliberately no free-text or regular-expression entry anywhere in the product. A pattern written by hand can be made to consume enormous amounts of processing time on a short input, which turns a data-entry form into a way of taking the system down. The set of checks is therefore fixed and curated instead, and each one carries its own short length cap and its own time limit.
How a validator runs
Four things happen in this order every time a value is saved into the field.
- If the value is empty or nothing but spaces, it is treated as empty and no validator runs at all.
- The global 4,000-character Text cap runs, and refuses with VALIDATION_MAX_LENGTH if the value is longer.
- The validator's own, much shorter length cap runs — 11 characters for a SWIFT code, 15 for an IMEI, and so on — and also refuses with VALIDATION_MAX_LENGTH.
- Only then does the validator's actual check run, refusing with its own code and message.
The check is enforced at two separate points, and it is worth knowing both exist. At definition time, an invalid validator or setting combination is refused when you save the definition. At value time, the validator runs again against every value somebody saves into the field.
The seven checks with no setting
These validate a specific external format and never take a parameter — supplying one is itself refused. Three of them verify a real check digit, which means a single mistyped digit is caught rather than only a wrong length.
| Validator | Shape | Max length | Check digit |
|---|---|---|---|
| IBAN | Two letters, two digits, then 11 to 30 letters or digits | 34 | Yes — verified |
| IMEI | Exactly 15 digits | 15 | Yes — verified |
| SWIFT / BIC Code | Six letters, two letters or digits, optionally three more | 11 | None in the standard |
| Vehicle Plate Number | 2 to 15 letters, digits, spaces or hyphens, either case | 15 | None in the standard |
| Egyptian National ID | 14 digits: century marker, then a plausible YYMMDD, then seven more | 14 | Not verified — none published |
| Saudi National ID | 10 digits starting with 1 or 2 | 10 | Yes — verified |
| Emirati ID (UAE) | 784, four digits, seven digits, one digit — hyphens optional | 18 | Not verified — none published |
IBAN
For an international bank account number. Use it wherever a wrong digit would send money to the wrong place.
The shape is checked first, then the real ISO check digits are verified. Capped at 34 characters — no live IBAN is longer. The value is matched exactly as submitted: it is not uppercased and spaces are not stripped for you.
| Example input | What happens |
|---|---|
| DE89370400440532013000 | Accepted. Shape and check digits both hold. |
| DE88370400440532013000 | Refused: VALIDATION_INVALID_FORMAT. The shape is perfectly valid and only the check digit is wrong — which is precisely the class of mistake a shape-only check would miss. |
| de89370400440532013000 | Refused. The letters must be upper case. |
| DE89 3704 0044 0532 0130 00 | Refused. IBANs are often printed in groups of four for readability, but the stored form has no spaces in it. |
IMEI
For a mobile device's identity number, as printed on the device or its box.
Exactly 15 digits, then the real check digit is verified. Capped at 15 characters. The 16- and 17-character display variants some devices show are not accepted.
| Example input | What happens |
|---|---|
| 490154203237518 | Accepted. |
| 490154203237519 | Refused: VALIDATION_INVALID_FORMAT. Fifteen digits, right shape, wrong final digit. |
| 49015420323751 | Refused: VALIDATION_INVALID_FORMAT. Fourteen digits fails the shape check — the length cap only ever catches a value longer than 15. |
SWIFT / BIC Code
For a bank identifier code, used alongside an account number for an international transfer.
Eight or eleven characters: six letters, then two letters or digits, then optionally three more letters or digits. Upper case only, no separators, capped at 11 characters. There is no check digit in the standard, so a well-formed code that belongs to no real bank is accepted.
| Example input | What happens |
|---|---|
| DEUTDEFF | Accepted — the eight-character form. |
| DEUTDEFF500 | Accepted — the eleven-character form with a branch code. |
| 1EUTDEFF | Refused: VALIDATION_INVALID_FORMAT. The first six characters must all be letters. |
| deutdeff | Refused. This is a fixed external format, and lower case is not part of it. |
| DEUTDEFF5 | Refused. Eight or eleven characters exactly — nine is neither. |
Vehicle Plate Number
For a vehicle registration plate, where you want to catch obvious nonsense without committing to any one country's format.
2 to 15 characters, made up of letters, digits, spaces and hyphens in any combination. Case-insensitive. Deliberately permissive — there is no country-specific plate format anywhere in this check, because plate formats differ by country and by vehicle class within a country.
| Example input | What happens |
|---|---|
| ABC 1234 | Accepted. |
| abc-1234 | Accepted. Unlike SWIFT, this check does not care about case. |
| A | Refused: VALIDATION_INVALID_FORMAT. The minimum is two characters. |
| ABC/1234 | Refused. A slash is not one of the four allowed character classes. |
Egyptian National ID
For an Egyptian national identity number.
Fourteen digits: a century marker of 2 or 3, then a date of birth as YYMMDD that has to be calendar-plausible, then seven more digits. Structure only — Egypt has never published a check-digit algorithm, so the last digit is not verified. Shipping a guessed algorithm would reject real, valid IDs, which is worse than not checking.
| Example input | What happens |
|---|---|
| 29005150112345 | Accepted. |
| 29013150112345 | Refused: VALIDATION_INVALID_FORMAT. Month 13 is not a plausible month. |
| 29005320112345 | Refused. Day 32 is not a plausible day. |
| 19005150112345 | Refused. The century marker must be 2 or 3. |
| 2900515011234 | Refused. Thirteen digits is not fourteen. |
Saudi National ID
For a Saudi national identity number or an Iqama (residency) number.
Ten digits, the first being 1 for a citizen or 2 for a resident, and the real check digit is verified. Capped at 10 characters.
| Example input | What happens |
|---|---|
| 1234567897 | Accepted. Shape and check digit both hold. |
| 1234567890 | Refused: VALIDATION_INVALID_FORMAT. Right shape, wrong check digit. |
| 3234567897 | Refused. The first digit must be 1 or 2. |
| 123456789 | Refused. Nine digits is not ten. |
Emirati ID (UAE)
For an Emirates ID number.
The 784-YYYY-XXXXXXX-C form, with the hyphens optional. Capped at 18 characters. Structure only — the UAE has never published a check-digit algorithm, so the final digit is not verified, for the same reason as the Egyptian check.
| Example input | What happens |
|---|---|
| 784-1990-1234567-8 | Accepted, hyphens and all. |
| 784199012345678 | Accepted. The hyphens are optional, so both written forms work. |
| 785-1990-1234567-8 | Refused: VALIDATION_INVALID_FORMAT. Every Emirates ID starts with 784. |
| 784-1990-123456-8 | Refused. The middle block is seven digits, not six. |
The six checks that need a setting
These require a Validator Parameter, and leaving it blank is refused at definition time — as is supplying one for a validator that takes none. The Validator Parameter control appears as soon as you pick one of these six.
| Validator | Setting format | Example setting |
|---|---|---|
| Postal Code | A country, chosen from a dropdown of the seven supported ones | EG |
| Numeric Range | Two comma-separated bounds; either side may be blank for an open end | 1,100 |
| Length Range | Two comma-separated character counts; either side may be blank | 2,50 |
| One of a List | One allowed value per line | Goalkeeper / Defender / Midfielder / Forward, one per line |
| Contains Text | Any literal text | FC- |
| Starts With Text | Any literal text | EG- |
Postal Code
For a postal code in a specific country. The country is part of the definition, not something the person filling in the record chooses.
The value is matched against the real postal-code format of the country you configured. Capped at 16 characters. Seven countries are supported and the dropdown never offers any others.
| Example input | What happens |
|---|---|
| 11511, with the setting EG | Accepted. Egypt is five digits. |
| 1151, with the setting EG | Refused: VALIDATION_INVALID_FORMAT. Four digits is not five. |
| 90210-1234, with the setting US | Accepted. The five-digit and the ZIP+4 forms are both valid. |
| SW1A 1AA, with the setting GB | Accepted. The UK format is matched in either case, with or without its space. |
| K1A 0B1, with the setting CA | Accepted, including the real letter exclusions Canada Post applies. |
Numeric Range
For a number inside bounds you set, on a field that is Text rather than Number — a shirt number, a squad size, a jersey count.
The value must parse as a number and fall inside the range. The setting is two comma-separated bounds; leaving one side blank makes that end open, but leaving both blank is refused, because a range that accepts everything is the same as attaching no validator at all.
| Example input | What happens |
|---|---|
| 50, with the setting 1,100 | Accepted. |
| 150, with the setting 1,100 | Refused: VALIDATION_RANGE. |
| "fifty", with the setting 1,100 | Refused: VALIDATION_RANGE. A value that is not a number cannot be inside a range. |
| 5000, with the setting 1, | Accepted. An open upper bound means any number at or above the lower one. |
| The setting , with both sides blank | Refused at definition time, explaining that the validator needs at least one bound. |
Length Range
For text that has to be a certain length — a two-letter code, a reference of at least eight characters.
The number of characters must fall inside the range. The setting is two comma-separated character counts, and either side may be left blank for an open end. This check produces two distinct codes rather than one, so you can tell too short from too long.
| Example input | What happens |
|---|---|
| "Alexandria" — 10 characters, with the setting 2,50 | Accepted. |
| "A" — 1 character, with the setting 2,50 | Refused: VALIDATION_MIN_LENGTH, naming the minimum. |
| An 80-character value, with the setting 2,50 | Refused: VALIDATION_MAX_LENGTH, naming the maximum. |
One of a List
For a closed set of answers on a Text field. If the closed set is the whole point of the field, a Select field is usually the better choice — but this exists for the case where you want a validator's behaviour on a Text field.
The value must exactly match one line of the list you configured, one value per line. Matching is case-sensitive.
| Example input | What happens |
|---|---|
| Goalkeeper | Accepted. |
| goalkeeper | Refused: VALIDATION_INVALID_FORMAT. The match is case-sensitive. |
| Sweeper | Refused: VALIDATION_INVALID_FORMAT. The value is not on the list. |
Contains Text
For a value that must include a marker somewhere in it — a club prefix, a season tag, a department code.
The value must contain the literal text you configured, matched case-sensitively.
| Example input | What happens |
|---|---|
| FC-2026-014 | Accepted, with the setting FC-. |
| fc-2026-014 | Refused: VALIDATION_INVALID_FORMAT. The match respects case. |
| 2026-014 | Refused: VALIDATION_INVALID_FORMAT. The marker is not present. |
Starts With Text
For a value that must begin with a prefix — a country code, a branch code, a fixed reference stem.
The value must begin with the literal text you configured, matched case-sensitively.
| Example input | What happens |
|---|---|
| EG-114-22 | Accepted, with the setting EG-. |
| 114-EG-22 | Refused: VALIDATION_INVALID_FORMAT. The text is present but not at the start — use Contains Text if position does not matter. |
| eg-114-22 | Refused: VALIDATION_INVALID_FORMAT. The match respects case. |
The seven Postal Code countries
Postal Code ships real, cited formats for exactly seven countries, and the setting is a dropdown rather than free text, so no other country can be chosen from the form.
| Country | Format | Valid example |
|---|---|---|
| EG — Egypt | Exactly five digits | 11511 |
| SA — Saudi Arabia | Five digits, optionally a hyphen and a four-digit extension | 12345 / 12345-6789 |
| US — United States | A five-digit ZIP, optionally a hyphen and a four-digit extension | 90210 / 90210-1234 |
| GB — United Kingdom | The standard UK postcode shape, either case, space optional | SW1A 1AA |
| DE — Germany | Exactly five digits, leading zero allowed | 10115 |
| FR — France | Exactly five digits | 75001 |
| CA — Canada | The A1A 1A1 shape, with Canada Post's real letter exclusions applied | K1A 0B1 |
Rejections when attaching a validator
These all happen at definition time, before any value is ever saved. Several are only reachable from a request that bypasses the form, because the form does not offer the invalid combination in the first place.
| Situation | What you see |
|---|---|
| A validator on a field that is not Text | Refused, naming the value type: a validator can only be attached to a Text field. |
| A parameterised validator with a blank setting | Refused, naming the validator: it requires a parameter. |
| A setting on one of the seven that take none | Refused, naming the validator: it does not accept a parameter. |
| A malformed range setting | Refused, explaining that two comma-separated bounds are needed, that either side may be blank, and that the lower bound must not exceed the upper one. |
| A range setting with both sides blank | Refused, explaining that a parameter with both sides blank would accept every value, which is the same as attaching no validator at all. |
| A Postal Code country that is not one of the seven | Refused, naming the country and listing the seven supported ones: EG, SA, US, GB, DE, FR, CA. |
| Postal Code with AE | Refused with its own dedicated message, explaining that the UAE has no national postal-code system and that the field should be left without a validator instead. |
Validator error codes
Every validator rejection is an HTTP 422, never a 500. If a validator failure ever produces a 500, that is a defect worth reporting — each one is written to refuse cleanly.
| Code | When it fires |
|---|---|
| VALIDATION_INVALID_FORMAT | Most validator failures: a shape that does not match, a check digit that does not verify, a value that is not on a One of a List list, a Contains or Starts With marker that is absent, or a postal code that does not match its country. |
| VALIDATION_RANGE | Numeric Range — the value is outside the bounds, or is not a number at all. |
| VALIDATION_MAX_LENGTH | The global 4,000-character Text cap, a validator's own shorter cap, or Length Range's upper bound. |
| VALIDATION_MIN_LENGTH | Length Range's lower bound. |
| VALIDATION_REQUIRED | The field is Required and the value is empty. This fires before any validator runs, so a whitespace-only value on a required field gets the generic required message rather than a validator-specific one. |
What validators do not do
- They only ever attach to a Text field. There is no way to put a format check on any of the other twenty-one types.
- They never re-check values that were already saved. Attaching a validator to a field that holds answers leaves those answers exactly as they are, including ones that would now fail, until somebody re-enters and saves them.
- They never run on an empty value. On a field that is not Required, a value of nothing but spaces is stored as cleared with no validator error at all — mark the field Required if a blank answer should be refused.
- They cannot be searched or filtered for. There is no view of every field using IBAN; the only way to see which validator a field has is to open that field.
- They have no browsable reference inside the product. To see the list of validators you open a Text field's definition form and read the dropdown.
- They cannot be written by hand. There is no regular-expression or pattern entry anywhere, by design, and the 13 built-in checks are the complete set.