Schema validation for Java

Teki is schema validation for Java DTOs.

Validate JSON-mapped requests and configuration objects with fluent rules, annotations, nested schemas, and structured field errors.

Java 17+

Fluent API

MIT licensed

// DTO mapped from JSON request datarecord SignupRequest(    @Required @Email @Trim String email,    @Required @Min(8) String password,    @Min(13) int age) {}// Chain rules fluently, then validate the DTOTeki signup = Teki.fromRules(    string(SignupRequest::email).required().email().trim(),    string(SignupRequest::password).required().min(8),    number(SignupRequest::age).min(13));// Or scan annotations from a Java classTeki schema = Teki.from(SignupRequest.class);var request = new SignupRequest("ada@example.dev", "super_secret", 21);var result = schema.check(request);if (!result.isValid()) {    result.errors().forEach(System.out::println);}

Why Teki

Java validation with schema-shaped ergonomics.

Use fluent rules when validation belongs near request handling, or annotations when the DTO should carry its own contract. Both paths produce the same structured errors.

Fluent schemas
Describe Java object validation with chainable rules that feel familiar if you have used Zod or Yup.
Annotation support
Put constraints on DTO fields and let Teki scan them into cached validators when the model should own the contract.
Structured errors
Collect field-level failures with stable rule types and readable messages, or abort early for fast rejection.

Explore the docs

Start with rules, then choose schemas or annotations.

The docs cover installation, builder rules, annotation scanning, custom rules, and structured validation errors.

Fluent rules, annotation scanning, nested validation, and field errors.