Skip to main content
Documentation
Docs
Esc

    Loading the search index…

    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.

    KindWhen it runsWhat it decides
    Verification requirementsAfter 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:

    SettingLabel in the editorMeaning
    NameWhat this requirement is calledHow the requirement is shown to reviewers.
    Accepted kindsDocuments that satisfy it, any one of theseThe 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 answersFields that must be presentQuestions the applicant must have answered for this requirement to be met.
    ThresholdMinimum confidenceHow 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.

    RuleApplies toChecks
    Format (preset)Short text, phoneA built-in format. See the table below.
    Custom patternShort textA pattern the whole answer must match.
    LengthShort text, long text, email, phoneAt least and at most a number of characters.
    Number rangeShort textA value between two numbers, optionally whole numbers only.
    Date rangeDateEarliest and latest dates, fixed or relative to today.
    AgeDateAt least or at most a number of years from the date.
    Only some optionsDropdownAccepts only some of the choices.
    Must be tickedCheckboxThe box is ticked.
    File type, size and pagesDocumentFile 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.

    PresetExample of a valid answer
    PIN code560001
    PANABCDE1234F
    PAN (strict holder type)ABCPE1234F
    IFSCHDFC0001234
    GSTIN27AAPFU0939F1ZV
    Aadhaar, last 4 digits1234
    Indian mobile number9876543210
    Vehicle registrationKA01AB1234

    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.