For PDF files with fillable fields, there's an easy way to validate the entered data. In addition to marking fields as required in the PDF itself, you can also set additional validations.
Table of validation rules
To validate a PDF form field, you can trigger the following validation rules by naming the form field something that ends with the suffix -x-assently-… (see below).
|Suffix for PDF form field name||Description|
|*-x-assently-nationalid||validates any valid national ID number (presently Swedish personnummer, Finnish henkilötunnus/personbeteckning)|
|*-x-assently-phone||any valid phone number (formatted as|
|*-x-assently-bankaccount||any valid bank account (presently Swedish bank account numbers, where both the clearing number and bank account number is entered in the same field)|
|*-x-assently-email||any valid email address|
|any number with decimal separator|
||any number with the value between minValue and maxValue|
||any number, validating the number of characters between minLength and maxLength.|
Here we have two text fields for email addresses:
A text field where you can enter an amount between 10 and 1000.
A text field for national ID number