Rules and validation
How a policy decides whether evidence is enough, through verification requirements, and how rules and format presets check each answer.
Pagebread checks an application at two moments, with two kinds of rule.
| Kind | When it runs | What it decides |
|---|---|---|
| Verification requirements | After the applicant submits, in the policy check. | Whether the evidence is enough: each requirement comes out satisfied, missing, failed, needing review, or not applicable. |
| Rules on items (validation) | While the applicant fills the form, and again on the server. | Whether an answer or upload is acceptable at all, such as a PAN in the right format. The applicant cannot continue until it is. |
Verification requirements
A policy has one verification requirement per document requirement, sharing its name. You see them under Verification requirements on the policy page, and edit them with Propose a change.
Each requirement has:
| Setting | Label in the editor | Meaning |
|---|---|---|
| Name | What this requirement is called | How the requirement is shown to reviewers. |
| Accepted kinds | Documents that satisfy it, any one of these | The document kinds that count. Any one of them is enough. With none selected, the requirement looks at whatever the applicant uploaded against its document. |
| Required answers | Fields that must be present | Questions the applicant must have answered for this requirement to be met. |
| Threshold | Minimum confidence | How sure Pagebread must be of what it read from the document, from 50% to 95%. Below it, the requirement goes to a person. |
When you create a policy, its requirements are generated from the documents and fields you set, using the Default Confidence Threshold from the Documents step (70% unless a template sets another). A template can also name the kinds each document accepts and the questions it needs.
Use Add requirement for a requirement that does not belong to one document, and Remove to take one out. When you save, requirements of documents you removed are removed too, and questions you removed are dropped from every requirement.
Warning
A policy with no verification requirements checks nothing an applicant supplies. The editor says so: "No verification requirements. Nothing an applicant supplies would be checked."
How the policy check reads them
For each requirement, the policy check looks at the files uploaded against it and the applicant's answers:
- Missing: a required document or a required answer is not there.
- Failed: the evidence shows something is wrong, for example a field read from the document fails validation.
- Needs review: the evidence cannot settle it, for example the reading confidence is below the threshold. A person decides.
- Satisfied: everything required is present, with enough confidence.
- Not applicable: the applicant's path through a custom flow did not ask for this document.
Requirements included from a pack are checked more strictly, and can carry more: the uploaded document must be one of the accepted kinds, and there can be a freshness window ("no older than N days"), a minimum value read from the document, or a rule in words for the reviewer. Where the evidence cannot show these, the requirement goes to a person. They appear under What this entails and sources on the Sources page. See Evaluation for how the outcomes add up to a result.
Rules on items
A rule checks one answer or one upload as the applicant fills the form, with a message you write. The applicant's browser checks it immediately, and the server checks it again on submit.
| Rule | Applies to | Checks |
|---|---|---|
| Format (preset) | Short text, phone | A built-in format. See the table below. |
| Custom pattern | Short text | A pattern the whole answer must match. |
| Length | Short text, long text, email, phone | At least and at most a number of characters. |
| Number range | Short text | A value between two numbers, optionally whole numbers only. |
| Date range | Date | Earliest and latest dates, fixed or relative to today. |
| Age | Date | At least or at most a number of years from the date. |
| Only some options | Dropdown | Accepts only some of the choices. |
| Must be ticked | Checkbox | The box is ticked. |
| File type, size and pages | Document | File types, a maximum size, a page count and a number of files. |
An item has at most 10 rules.
Format presets
Presets are ready-made formats for Indian identifiers. Most also tidy the answer before it is stored, for example by removing spaces or uppercasing.
| Preset | Example of a valid answer |
|---|---|
| PIN code | 560001 |
| PAN | ABCDE1234F |
| PAN (strict holder type) | ABCPE1234F |
| IFSC | HDFC0001234 |
| GSTIN | 27AAPFU0939F1ZV |
| Aadhaar, last 4 digits | 1234 |
| Indian mobile number | 9876543210 |
| Vehicle registration | KA01AB1234 |
Where rules come from
Rules can sit in two places, and both apply:
- On a policy item. Rules arrive with items included from a pack, and stay with the item. The policy editor keeps them when you save. Rules on a policy's items apply in every flow that uses the policy. See Composing a policy from packs.
- On a flow. In a custom flow, you add rules to a question or upload in the flow designer. Those apply in that flow only.
When two packs set rules on the same requirement, every rule applies, so the stricter one wins.
Whether a policy's items can carry rules, and whether they can go beyond format presets, depends on your plan. The same goes for custom patterns and cross-field rules in flows. See Editions and limits.
Related
- Fields and documents
- Evaluation
- Impact projections: what a stricter rule would do to people who already applied.