Validation is the unsung hero of form technology. Get it right, and users glide through forms with confidence. Get it wrong, and you get frustrated users, dirty data, and downstream headaches that cost real money to fix.
When we set out to build Say2Form's validation engine, we had a specific vision: validation should happen in real-time, it should understand context, and it should help users fix errors, not just flag them. Traditional validation checks formats (is this a valid email?) but misses meaning (does this email match the company domain the user mentioned earlier?).
The engine operates on three layers. Layer one is structural validation, the basics. Format checks, required field enforcement, character limits. This layer runs client-side for instant feedback with zero latency.
Layer two is semantic validation, understanding meaning. This is where AI comes in. When a user says their annual revenue is fifty dollars for a enterprise SaaS company, the engine flags it as a potential error. When someone enters a future date for a past event field, it catches the inconsistency. This layer uses a lightweight ML model that runs on the edge for sub-100ms response times.
Layer three is contextual validation, cross-referencing data across fields and against external sources. If a user provides a zip code that does not match the city they entered, the engine suggests the correct combination. If a phone number format does not match the selected country, it offers to reformat. This layer requires server-side processing but returns results in under 200ms.
Key Insights
One of the most challenging aspects was handling voice input validation. When a user speaks, the ASR system may produce multiple possible transcriptions. Our validation engine scores each possibility against the expected field type and context, selecting the most likely correct interpretation. This reduces voice input errors by 60% compared to taking the top ASR result at face value.
Error messaging was another area where we invested heavily. Instead of generic messages like invalid input, we generate specific, actionable guidance. The system tells the user what it expected, what it received, and how to fix it, in plain language, not developer jargon.
Performance was a non-negotiable constraint throughout development. Validation must never feel slow. We achieved P99 latency of 47ms for structural validation, 89ms for semantic validation, and 180ms for contextual validation. Users perceive the feedback as instantaneous.
Building this engine taught us that validation is not a feature, it is an experience. Done well, it builds user trust and delivers clean, reliable data. We continue to refine the engine with every data point, making it smarter, faster, and more helpful with each passing day.

Written by
David Park
Lead Engineer at Say2Form. Passionate about AI, data, and building tools that make work effortless.
