Compile-Time Driven
Validation logic is types. Constraints are baked in at compile time with zero runtime reflection.
Type-safe data validation with 40+ built-in types, human-readable errors, and zero runtime overhead. 102 tests passing.

const std = @import("std");
const z = @import("zigantic");
pub fn main() !void {
// Direct validation with rich utilities
const email = try z.Email.init("alice@company.com");
std.debug.print("Domain: {s}\n", .{email.domain()}); // "company.com"
std.debug.print("Business: {}\n", .{email.isBusinessEmail()}); // true
// Password with strength checking
const pwd = try z.Secret(8, 100).init("MyP@ss123!");
std.debug.print("Strength: {d}/6\n", .{pwd.strength()}); // 5
// Numbers with utilities
const age = try z.Int(i32, 18, 120).init(25);
std.debug.print("Even: {}, Positive: {}\n", .{age.isEven(), age.isPositive()});
// IP with network utilities
const ip = try z.Ipv4.init("192.168.1.1");
std.debug.print("Private: {}\n", .{ip.isPrivate()}); // true
}zig fetch --save https://github.com/muhammad-fiaz/zigantic/archive/refs/tags/v0.0.1.tar.gz// build.zig
const zigantic = b.dependency("zigantic", .{ .target = target, .optimize = optimize });
exe.root_module.addImport("zigantic", zigantic.module("zigantic"));String NonEmptyString Trimmed Lowercase Uppercase Alphanumeric AsciiString Secret StrongPassword
Int UInt PositiveInt NonNegativeInt NegativeInt EvenInt OddInt MultipleOf Float Percentage Probability PositiveFloat NegativeFloat FiniteFloat
Email Url HttpsUrl Uuid Ipv4 Ipv6 Slug Semver PhoneNumber CreditCard Regex
List NonEmptyList FixedList
Default Custom Transform Coerce Literal Partial OneOf Range Nullable Lazy
Run the included examples:
zig build run-basic # Direct validation + JSON
zig build run-advanced_types # All 40+ types demo
zig build run-validators # Validator functions
zig build run-json_example # Full JSON workflow
zig build run-error_handling # Error management