Loading...
Loading...
Browse 7 real-world technical and behavioral interview questions about Validation. Review scenarios, edge cases, and architectural best practices.
The feature encodes the outcome, so the model reads the answer rather than predicting it. Offline the label and the feature come from the same snapshot, which is why validation looks excellent; in production the feature is empty at scoring time and the signal vanishes. Fix by defining features by when they were available and validating on a forward time split.
@Value injects one expression per field with no grouping, no relaxed name matching and no validation. @ConfigurationProperties binds a whole subtree onto a typed object, matches names loosely, handles lists and nested types, and combined with @Validated it fails the context refresh when the environment is wrong.
Accessible form errors need visible text, programmatic association with the field using aria-describedby, aria-invalid for state and deliberate focus handling after submit. Use this accessibility answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects FORMS to the point an interviewer is testing.
Constrain the decoder to a schema instead of asking for JSON in prose, reserve enough output tokens that a complete document fits, validate at the boundary, and allow one repair retry that quotes the exact violation back.
You look for evidence of the behaviour, not enthusiasm for your idea: interviews about past specific episodes rather than hypothetical futures, triangulated against what usage data, support tickets and lost deals show people already do.
TypeScript erases at compile time, so a type annotation on request data is an assertion about the future rather than a check. Anything crossing a boundary the compiler cannot see - a request body, a database row, a JSON file, an API response - has to be validated at run time, with the type derived from the validator.
TypeScript stops protecting you at runtime boundaries such as JSON, HTTP requests, local storage and third-party packages. Validate untrusted input at the boundary, then let static types carry the trusted shape inside the app. It also connects type soundness to the point an interviewer is testing.