TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is data validation? Checks, where to run them and a worked example

Data validation checks values against rules before they are stored or used. Eight types of check, where to run them, a worked example of how bad event values distort revenue, and how to set the rules up in TapCub.

Lucas Hayes Reviewed by Chen Yu Also called data validation checks Last updated Nov 17, 2026 Glossary

Quick answer

Data validation is checking data against defined rules, such as type, range, format and required fields, before it is stored or used. It shows that data is well formed, not that it is true, and it works best at the source and at intake, before wrong values reach reports.

What is data validation?

Data validation is checking data against defined rules before it is stored or used, so that values of the wrong type, out of range, in the wrong format or missing never reach your reports. IBM describes valid data as data that stays within permitted limits or ranges, follows specified formats and meets the organization's own criteria. In analytics the data is events and their properties, and a rule looks like "purchase value is a number between 0 and 1,000".

Validation shows that data is valid, not that it is true. A purchase recorded as $40 for a $50 order passes every rule. It also differs from cleansing: validation decides whether to accept a value as it arrives, while cleansing fixes what is already stored.

Types of validation checks

CheckQuestion it asksExample rule for an eventJSON Schema keyword
PresenceIs a required field there?order_id must existrequired
TypeIs it the right kind of value?value is a number, not the text "$40"type
RangeIs it within limits?value is at least 0 and at most 1,000minimum, maximum
Allowed valuesIs it one of a fixed list?plan is free, pro or maxenum
FormatDoes it match a pattern?order_id looks like ORD-123456pattern
LengthIs it short enough?coupon has at most 20 charactersmaxLength
UniquenessAre there duplicates?A list holds each item onceuniqueItems (arrays only)
ConsistencyDo fields agree with each other?refund_amount is not more than valueNone: needs a cross-field rule

The last column is the formal vocabulary the JSON Schema specification uses for the same checks. It is a handy way to write the rules down precisely, whatever tool enforces them.

Where to validate: source, intake or after storage

StageWhat it catchesCost of a missWhat happens to a bad row
At the source (tests, review, a written tracking plan before release)Wrong names and types before they shipLowestThe bad code never ships
At intake (when events arrive)Malformed events from any senderMedium: visible at once, but rows may be lostWarn, strip a field, reject, or hold for review
After storage (quality checks and monitors)Drift, volume drops, tracking that went staleHighest: reports have already used wrong numbersFix going forward and backfill history

Earlier is cheaper, but each stage catches things the others cannot, so use more than one.

Worked example: what unvalidated events do to revenue

Sample data: 5,000 purchase events in a week, each worth $40.00 if sent correctly, so true revenue is 5,000 × $40.00 = $200,000. Three kinds of sender are mixed in.

GroupEventsWhat was sentEffect on a revenue sum
Correct4,675value = 40.00 (number)Counted: 4,675 × $40 = $187,000
Text value300value = "$40.00" (text)Cannot be summed, so adds $0
Cents instead of dollars25value = 4000Counted: 25 × $4,000 = $100,000

Reported revenue is $187,000 + $0 + $100,000 = $287,000, which is 43.5% above the true $200,000, and the chart shows no error. Two bugs pull in opposite directions: 300 events (6.0%) vanish from the sum, and 25 events (0.5%) are inflated 100 times.

Now add two intake rules: value must be a number, and at most 1,000. Both groups break a rule, 325 events in all (6.5%).

  • With quarantine, 4,675 events are stored and revenue reads $187,000, which is 6.5% low. The data-quality page now lists 325 held events with the reason, so the senders can be fixed.
  • With warn only, all 5,000 events are stored and revenue still reads $287,000, but 325 warnings say why.

Validation does not fix the numbers. It turns a silent 43.5% error into a visible 325-event problem. The action you choose is the trade-off: blocking loses the rows, warning keeps them but leaves bad numbers in the reports.

Common mistakes

  • Checking format but not meaning. A well-formed value can still be wrong. Validation catches malformed data, so pair it with reconciliation against a source you trust, such as orders in your own database.
  • Blocking everything on day one. A rejected event is gone for good. Start with warnings, read what they show, then tighten the rules that proved right.
  • Keeping the rules in someone's head. Write each event's name, property types, required fields and an example into a tracking plan so the rule can be reviewed and tested, and see event schema for the shape those rules describe.
  • Validating once, at launch. Trackers break after releases. Keep checking volume and missing fields afterwards; data observability covers that.
  • Assuming "required" means enforced. Marking a field required in a plan documents the expectation. It enforces nothing unless a rule acts on it.
  • Validating only one sender. The browser is just one source. Servers, mobile apps and imports can send the same event with different types, so apply the rule where all of them arrive.
  • Reading rejections as low traffic. If rejected events are not counted anywhere, a broken sender looks like a quiet day. Track the number of rejects. Who owns the rules is a question for your data governance.

Data validation in TapCub

Take the purchase example. This is how the same rules look in TapCub.

  1. Write the rule down. In All-platform analytics › Data › Tracking plan, add the purchase event with its properties: value as a number and required, currency, order_id. Each row also has an owner, platforms and a status (Proposed, Developing, Accepting, Live, Deprecated). The plan records events you intend to collect, including ones not sent yet.
  2. Watch the first 24 hours. Turn on Live verification (24 h) to add two columns: hits in the last 24 hours and the completeness of required properties. Low completeness is a warning and blocks nothing by itself.
  3. Enforce at intake. In All-platform analytics › Data › Property dictionary, edit value and add a validation rule: expected type, required on events, a regular expression, maximum length, minimum and maximum, or allowed values. Choose what happens on a violation: warn only (event stored, one warning), drop the property (event stored, key removed), block the event (not stored) or quarantine it (not stored, held for review). A rule applies only after you save it.
  4. Review what was caught. All-platform analytics › Data › Data quality has tabs for ingestion warnings, high cardinality, stale detection, quarantine and tiered decay. Quarantine keeps the latest 300 held events. You cannot release them into storage from there, and clearing it discards them, so fix the sender first and then click Clear quarantine.
  5. Triage unknown names. An event with no definition arrives as unplanned and is still stored. Accept it from All-platform analytics › Data › Event inbox, or set its definition to Blocked to drop that name. TapCub does not check event names against the plan unless you block them.

Editing rules and clearing quarantine need the Analyst role or above.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lucas Hayes

Data Engineer

Writes about event design, data quality, and collection workflows, with verifiable implementation methods for reliable analytics.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is the difference between data validation and data verification?

Validation checks that a value follows the rules, such as being a number in range. Verification checks that it matches reality, such as comparing a recorded order total with the order in your database. A value can pass validation and still fail verification.

What are the main types of data validation?

The common checks are presence of required fields, data type, range, allowed values, format, length, uniqueness and consistency between fields. Event data mostly uses type, required, range and allowed-value checks on properties.

Should invalid events be blocked or only flagged?

Start by flagging. A blocked or quarantined event is not stored, so a rule that is too strict loses real data. Once a rule has shown only true errors, block or quarantine that case so bad values stay out of reports.

Does TapCub check event names and required properties?

Not by default. An event name with no definition arrives as unplanned and is still stored unless its definition is set to Blocked, and a required property only feeds completeness figures. Validation rules in the property dictionary are what reject or hold bad values.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics