DEV Community

Drax_
Drax_

Posted on

I Was Building a Platform… Then Ended Up Creating My Own Validation Library 🤯

So I was casually working on my platform.

Nothing unusual — just the typical flow:
build the frontend, wire up the backend, handle forms, validation… you know the drill.

At some point, I needed validation (like every app does).
And naturally, I thought:

“Alright, let me just plug in a library and move on.”

But then something felt… off.


🤔 The Thought That Started It

I kept running into the same things:

  • Some libraries felt too heavy
  • Others were too abstract
  • Sometimes I just needed something simple, but ended up writing a lot of code anyway

And then this random thought came:

“What if I just build my own validation system?”

Not because I wanted to compete with anything.
Not because I had a grand plan.

Just curiosity.


🧪 It Started Very Small

At first, it was nothing serious.

Just something like:

const schema = {
  email: { rule: "email", errorMsg: "Invalid email" }
};
Enter fullscreen mode Exit fullscreen mode

And a simple function to validate data against it.

That was it.

No big architecture. No overthinking.


😅 Then It Kept Growing…

As I continued building my platform, I kept improving it:

  • Added more rules
  • Made error handling cleaner
  • Simplified how schemas are written
  • Tweaked the structure again and again

And slowly… it stopped being “just a small helper”

It started feeling like something real.


🚀 I Didn’t Expect This Part

At some point I stepped back and realized:

“Wait… this is actually becoming a full validation library.”

That honestly wasn’t the goal at the beginning.

I was just trying to solve my own problem while building something else.


🧠 What I Learned From This

A few things stood out to me:

  • You don’t always need to start with a big idea
  • Sometimes building “just for your project” leads to something bigger
  • Simplicity is actually harder than complexity
  • And most importantly… just building teaches you a lot

📦 Meet drea

So yeah… that small experiment now has a name: drea

It’s:

  • lightweight
  • rule-based
  • simple to use

No complex chaining.
No unnecessary abstraction.
Just straightforward validation.


🙌 Still Early — Would Love Feedback

I’m still improving it and figuring out where it can go.

If you’ve ever felt like validation libraries are sometimes “too much”,
I’d really love to hear your thoughts.

Would you use something like this?
What would you expect from it?


💭 Final Thought

This wasn’t planned.

It started as:

“let me just fix this small thing real quick…”

see docs at https://drea-docs.netlify.app

And somehow turned into:

“I think I built a library.”

Funny how that happens.


Top comments (0)