Server-side validation

Validation is happening inside the server function using Zod.