Validator
Definition
A validator checks whether data meets specified requirements.
For example, it controls mandatory fields, data types, value ranges, or relationships between entries. In case of violations, it returns errors instead of passing on unchecked data for further processing.
Simply explained
Like a checklist at the entrance of a workflow.
Why it matters in practice
Errors can be detected before they affect further processing steps.
Example from business
Hypothetical example: An import rejects records without a valid article number.
Limits and pitfalls
- Formally valid data can be factually incorrect; pure browser checks can be bypassed.
Origin & history
Validators are among the fundamental building blocks of structured data processing.
Use in mid-sized companies
- Check forms, interfaces, and AI outputs.
Frequently asked questions
Does a successful validator prove the truth of a text?
No, only the actually checked rules.
Sources
- Form validation · MDN: Form validation –
- Introduction · Zod: Introduction –
Editorially reviewed on: