Accessibility Compliance
SurveyJS libraries meet a variety of WCAG and Section 508 standards. Run AXE® Validation to assess this demo’s accessibility level.

Double-Entry Verification

Edit in →

Double-entry verification—also known as double data entry or dual data entry—is a data quality control process in which the same information is entered independently twice, and the two entries are then compared to identify discrepancies. Its purpose is to detect human transcription errors, particularly when data is captured from paper forms, scanned documents, handwritten notes, or other source records. Unlike ordinary validation, which checks whether a value is valid, double-entry verification checks whether it was entered accurately. For example, the value 27 passes a numeric validator even if the source document says 72.

A typical double-entry verification workflow includes two validation layers:

  • Assisted confirmation
    Email and confirm email are compared with a client-side expression validator. In this demo, validators use "notificationType": "warning", so validation messages do not block form submission. To prevent the form from being submitted until the issue is resolved, use the default "error" notification type. See Validator Notification Types.

  • Selective dual entry
    Critical fields are entered again on the second page and compared asynchronously in the onServerValidateQuestions event, which can return a custom validation message for each field.

How This Demo Works

  1. First entry
    Enter the participant ID, weight, height, date of birth, and email, or click Fill Sample Data.

  2. Assisted check
    Confirm the email address. An expression validator checks that both email fields match.

  3. Second entry
    Re-enter the critical fields without seeing the first-entry values, or click Fill Sample Data.

  4. Server-side comparison
    When you complete the form, onServerValidateQuestions compares the paired values and reports mismatches as field-level errors.

Connect to an API Endpoint

In regulated environments, a second operator often compares their entries with the first operator's saved submission on the server. To implement this workflow, call your comparison endpoint in onServerValidateQuestions, populate the errors object, and then call complete():

function validateDoubleEntryAsync(sender, { data, errors, complete }) {
  fetch("/api/validation/double-entry", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      // Prefer sender.data so first-entry values are available when only page 2 is validated
      participantId: sender.data.participantId,
      participantId2: data.participantId2,
      weightKg: sender.data.weightKg,
      weightKg2: data.weightKg2
      // ...other paired fields
    })
  })
    .then((response) => response.json())
    .then((result) => {
      // result.errors: { weightKg2: "Mismatch with first entry..." }
      Object.keys(result.errors || {}).forEach((name) => {
        errors[name] = result.errors[name];
      });
      complete();
    })
    .catch(() => {
      errors["weightKg2"] = "Comparison service is temporarily unavailable. Try again.";
      complete();
    });
}

survey.onServerValidateQuestions.add(validateDoubleEntryAsync);

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.