Svelte · Senior · Question 34 of 75
Why should remote function arguments be validated?
- ✓Correct answer: They are callable over HTTP by anyone, so input must be checked, typically with a Standard Schema validator like Zod or Valibot
- 2TypeScript types are enforced at runtime
- 3Arguments are always trusted
Explanation
Types disappear at runtime; validation protects the server from malformed or malicious input.