#Zod

2025-07-01

“To enjoy Glastonbury, you have to submit to it”

Jarvis Cocker, on the Pyramid Stage last weekend.

#Zod #Glastonbury

It’s a cartoon picture of Michael Eavis, looking like the genial fellow he is. He has his hands clasped below his chin. The caption, after Zod in Superman 2, is “KNEEL BEFORE GLASTONBURY”
2025-06-27

Наводим порядок в загрузке данных Angular с помощью резолверов

Всем привет! Сегодня хочу разобрать кейс, с которым сталкивается почти каждый Angular-разработчик на существующем проекте. Часто в компонентах можно встретить такой код:

habr.com/ru/articles/922376/

#angular #resolver #zod #cache #javascript #typescript #frontend #web #perfomance

2025-05-07

[Перевод] Zod v4: Стал в 17 раз медленнее? (и почему это важно)

Всем привет! 👋 Я — Дмитрий , автор Sury — самой быстрой библиотеки для работы со схемами. Если вы фанат Zod (а кто не фанат?), эта статья для вас. Сегодня я поделюсь неожиданными результатами тестов производительности Zod v4, расскажу, что это значит для вас, и как избежать подводных камней. Zod v4: Стал в 17 раз медленнее и никто этого не заметил 🙈 Начнём с небольшого кликбейта. Это действительно так, но, конечно, не вся правда. Давайте разберёмся.

habr.com/ru/articles/907512/

#zod #performance #validation #optimization #typescript

2025-04-29

Альтернатива Zod размером 1 КБ

19 марта 2025 года вышла стабильная версия Valibot — библиотеки для валидации данных в JavaScript/TypeScript. Разработанная как альтернатива популярному Zod, она сочетает минималистичный дизайн с мощными возможностями. В этой статье мы сравним Valibot и Zod по трём ключевым параметрам: синтаксису API, размеру библиотеки и скорости работы. Вы узнаете, чем эти решения отличаются друг от друга и почему стоит использовать специализированные инструменты валидации входящих данных.

habr.com/ru/companies/domclick

#valibot #zod #typescript #javascript

Swapneel Mohiteswapneelsmohite
2025-04-16
2025-04-07

Small server-side field validation with #bun, #hono and #zod.

```
bun create hono@latest my-app
bun add zod
bun run dev
```

Source in the image description. All you need in addition is a favicon.ico and an empty fallback.txt (or put some funny text inside, up to you). Oh and of course the form.html

import { Hono } from "hono";
import { serveStatic } from "hono/bun";
import { z } from "zod";

const app = new Hono();

const formSchema = z.object({
  name: z.string().min(1, "Name is required").max(100),
  email: z.string().email("Invalid email format"),
});

// Routes
app.use("/static/*", serveStatic({ root: "./" }));
app.use("/favicon.ico", serveStatic({ path: "./favicon.ico" }));

app.get("/", (c) => {
  return c.html(
    "Hello, Hono and Bun here! Try <a href='/static/form.html'>/static/form.html</a>"
  );
});

app.get("*", serveStatic({ path: "./static/fallback.txt" }));

app.post("/submit", async (c) => {
  const body = await c.req.parseBody();

  try {
    // Validate and return data as json
    const validatedData = formSchema.parse({
      name: body.name,
      email: body.email,
    });

    return c.json({
      message: "Form submitted successully",
      data: validatedData,
    });
  } catch (error) {
    // An error occured, lets check
    if (error instanceof z.ZodError) {
      return c.json(
        {
          message: "Validation Error.",
          errors: error.errors,
        },
        404
      );
    }
    // Some other error occured
    return c.json(
      {
        message: "An error occured.",
        error: error,
      },
      500
    );
  }
});

export default app;
Tommi Komulainentko
2025-04-04

does happen to have a convenience preprocessor to turn `address.city` like flat form fields into nested `address: { city: ... }` objects?

2025-03-25

Создание простого хука для работы с формами в React на основе `zod`

Создание простого хука для работы с формами в React на основе zod В этой статье мы реализуем удобный хук useForm , который минимизирует ререндеры и упрощает работу с формами в React , используя FormData для сбора данных и zod для валидации. Рассмотрим разницу между контролируемыми и неконтролируемыми компонентами.

habr.com/ru/articles/894368/

#react #typescript #javascript #forms #zod

2025-03-01

How can they simultaneously be so dangerous and so. Fraggin'. Borin'! Ain't they borin', poozers? Go ahead, vent about borin' fascists, I'll listen!

Like what I do? Keep me goin' at the coffee site in my bio!

(Art sampled from "Superman" Vol. 6 #23 by Joshua Williamson, Dan Mora, Alejandro Sánchez, Ariana Maher, Jillian Grant, and Paul Kaminski. Edits: Altered dialogue and moved inset panel.)

#comics #dccomics #zod #kneelbeforezod #superman #newcomicbookday #antifascist #antifa

In a comic panel a very bored General Zod stands in a futuristic medical center, while someone off-panel rambles, "So he can't be a nazi because real nazis are germans from the 1930s so just because he walks talks acts thinks and hurts others like a nazi doesn't mean he's a nazi because it's a narrow--" Zod says, "This will not end well for you." The off-panel voice continues, "It's not eugenics because we're just worried about the culture and--" An inset panel shows Zod squishing the speaker's head in a gout of blood with a "SPLOOT" sound effect. A caption reads "A Kilowog-core Edit".

The missing guide to Zod!

didoesdigital.com/blog/zod-ove

This TypeScript validation library is convenient for checking data like web form user input. It also lets you define your schema once and enjoy the confidence of legit data and accurate types!

But I found the documentation lacking. So I wrote this guide to fill in the gaps. What started life as one post became five. And here we are! Enjoy!

#zod #typescript #javascript #webdev

2025-02-23

Zod has ended billions and conquered entire planets, but that haircut is his worst atrocity.

Like what I do? Keep me goin' at the coffee site in my bio!

(Art sampled from "Action Comics" Vol. 1 #1060 by Joe Casey, Dan McDaid, John Kalisz, Troy Peteri, Jillian Grant, and Paul Kaminski. Edits: Added dialogue and new background.)

#comics #dccomics #zod #kneelbeforezod

In a comic panel Urza and Lor-Zod, of the house of General Zod, are dressed in their militaristic house of Zod uniforms. Lor-Zod's head is shaved, except for one strip that is combed over his left side. Urza says, "Your father-- as well as your general-- sees things differently. In Zod we trust." Lor-Zod says, "If he were trustworthy why would he give me this haircut?" A caption reads "A Kilowog-core Edit".

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst