<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Drax_</title>
    <description>The latest articles on DEV Community by Drax_ (@drax_).</description>
    <link>https://dev.to/drax_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3365734%2F7eaa941a-fc5b-4beb-8955-e19d0072af70.jpg</url>
      <title>DEV Community: Drax_</title>
      <link>https://dev.to/drax_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/drax_"/>
    <language>en</language>
    <item>
      <title>I Was Building a Platform… Then Ended Up Creating My Own Validation Library 🤯</title>
      <dc:creator>Drax_</dc:creator>
      <pubDate>Thu, 23 Jul 2026 14:54:30 +0000</pubDate>
      <link>https://dev.to/drax_/i-was-building-a-platform-then-ended-up-creating-my-own-validation-library-27b0</link>
      <guid>https://dev.to/drax_/i-was-building-a-platform-then-ended-up-creating-my-own-validation-library-27b0</guid>
      <description>&lt;p&gt;So I was casually working on my platform.&lt;/p&gt;

&lt;p&gt;Nothing unusual — just the typical flow:&lt;br&gt;
build the frontend, wire up the backend, handle forms, validation… you know the drill.&lt;/p&gt;

&lt;p&gt;At some point, I needed validation (like every app does).&lt;br&gt;
And naturally, I thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Alright, let me just plug in a library and move on.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But then something felt… off.&lt;/p&gt;


&lt;h2&gt;
  
  
  🤔 The Thought That Started It
&lt;/h2&gt;

&lt;p&gt;I kept running into the same things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some libraries felt &lt;strong&gt;too heavy&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Others were &lt;strong&gt;too abstract&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Sometimes I just needed something &lt;em&gt;simple&lt;/em&gt;, but ended up writing a lot of code anyway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And then this random thought came:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What if I just build my own validation system?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not because I wanted to compete with anything.&lt;br&gt;
Not because I had a grand plan.&lt;/p&gt;

&lt;p&gt;Just curiosity.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧪 It Started Very Small
&lt;/h2&gt;

&lt;p&gt;At first, it was nothing serious.&lt;/p&gt;

&lt;p&gt;Just something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;errorMsg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Invalid email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a simple function to validate data against it.&lt;/p&gt;

&lt;p&gt;That was it.&lt;/p&gt;

&lt;p&gt;No big architecture. No overthinking.&lt;/p&gt;




&lt;h2&gt;
  
  
  😅 Then It Kept Growing…
&lt;/h2&gt;

&lt;p&gt;As I continued building my platform, I kept improving it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added more rules&lt;/li&gt;
&lt;li&gt;Made error handling cleaner&lt;/li&gt;
&lt;li&gt;Simplified how schemas are written&lt;/li&gt;
&lt;li&gt;Tweaked the structure again and again&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And slowly… it stopped being “just a small helper”&lt;/p&gt;

&lt;p&gt;It started feeling like something real.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 I Didn’t Expect This Part
&lt;/h2&gt;

&lt;p&gt;At some point I stepped back and realized:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Wait… this is actually becoming a full validation library.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That honestly wasn’t the goal at the beginning.&lt;/p&gt;

&lt;p&gt;I was just trying to solve my own problem while building something else.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What I Learned From This
&lt;/h2&gt;

&lt;p&gt;A few things stood out to me:&lt;/p&gt;

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




&lt;h2&gt;
  
  
  📦 Meet &lt;strong&gt;drea&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;So yeah… that small experiment now has a name: &lt;strong&gt;drea&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lightweight&lt;/li&gt;
&lt;li&gt;rule-based&lt;/li&gt;
&lt;li&gt;simple to use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No complex chaining.&lt;br&gt;
No unnecessary abstraction.&lt;br&gt;
Just straightforward validation.&lt;/p&gt;




&lt;h2&gt;
  
  
  🙌 Still Early — Would Love Feedback
&lt;/h2&gt;

&lt;p&gt;I’m still improving it and figuring out where it can go.&lt;/p&gt;

&lt;p&gt;If you’ve ever felt like validation libraries are sometimes “too much”,&lt;br&gt;
I’d really love to hear your thoughts.&lt;/p&gt;

&lt;p&gt;Would you use something like this?&lt;br&gt;
What would you expect from it?&lt;/p&gt;




&lt;h2&gt;
  
  
  💭 Final Thought
&lt;/h2&gt;

&lt;p&gt;This wasn’t planned.&lt;/p&gt;

&lt;p&gt;It started as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“let me just fix this small thing real quick…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;see docs at &lt;a href="https://drea-docs.netlify.app" rel="noopener noreferrer"&gt;https://drea-docs.netlify.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And somehow turned into:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I think I built a library.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Funny how that happens.&lt;/p&gt;




</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
