Skip to catalogue

runtime validation

Check untrusted values when the program receives them.

Use this when An API or file supplies data that TypeScript types merely assume is valid.

without the term

“The API sometimes gets bad data and things crash deep inside. I thought TypeScript types would catch it but apparently not. Can you check the input properly when it comes in?”

with the term · How do you ask a model for runtime validation?

Add runtime validation at this input boundary. Test malformed fields and invalid domain values before allowing side effects.

XBlueskyLinkedIn

What is runtime validation?

Runtime validation checks whether actual input satisfies a contract. Compile-time types do not validate bytes received from a request, file, or model.

Why does runtime validation matter when vibe coding?

A generated type assertion can silence the compiler while admitting invalid data.

How do you do runtime validation?

Validate at the boundary, then pass the validated value inward. Check both malformed shapes and domain constraints.

What goes wrong with runtime validation?

Validating the shape but trusting a caller-supplied identity or ownership claim.

adjacent

reviewed

report a correction