🛡️ Advanced JavaScript — Day 2: Form Validation with Regex Today I built a Form Validation project using JavaScript — and this one was different from anything I'd done before. Not because forms are complex. But because today I used Regex for the first time to validate inputs — and it completely changed how I think about data validation. Here's everything I covered and built today 👇 📌 What is Form Validation? 📌 preventDefault() 📌 Regex — Regular Expressions 🔍 📌 Dynamic Error Messages 📌 isValid Flag Simple pattern. Used everywhere in production code. Form validation isn't just about blocking bad data. It's about respecting the user — giving clear, instant feedback instead of letting them wonder what went wrong. Project done. Concepts understood. Moving forward.... #AdvancedJavaScript #JavaScript #FormValidation #Regex #100DaysOfCode #LearnInPublic #WebDevelopment #Frontend #Programming #CodingJourney #BuildInPublic
JavaScript Form Validation with Regex
More Relevant Posts
-
Today I finally understood how JavaScript actually stores data in memory — and it changed the way I look at code. Earlier, I used to just write variables and functions without thinking much about what’s happening behind the scenes. But now it makes a lot more sense: Primitive values (like numbers, strings, booleans) are stored directly in memory Reference types (like arrays and objects) are stored differently — the variable holds a reference, not the actual value That’s why things like this behave unexpectedly sometimes: Copying objects doesn’t create a real copy Changing one reference can affect another Understanding this cleared up a lot of confusion I had while debugging. Still learning, but this felt like a small breakthrough Hitesh Choudhary Piyush Garg Chai Code #JavaScript #WebDevelopment #100DaysOfCode #LearningInPublic
To view or add a comment, sign in
-
-
📌 Learning JavaScript Form Validation Today I practiced Form Validation in JavaScript by building a simple Signup Form. I learned how to: ✅ validate input fields using input and submit events ✅ show error messages dynamically using DOM manipulation ✅ validate email format using Regex ✅ apply password rules (min 8 characters + at least one number) ✅ implement show/hide password functionality This project helped me understand real-world form validation logic in a clear way. #JavaScript #FormValidation #FrontendDevelopment #WebDevelopment #Learning #DOM #Regex
To view or add a comment, sign in
-
What actually happens when JavaScript executes a regular expression? Not the syntax. The execution. The engine. I spent weeks going deep into this question, and the answer took me from Kleene's 1956 algebra to V8's JIT-compiled bytecode. The result is this article that traces the full lifecycle of a regex through the engine. A few things I learned along the way: → V8's Irregexp has its own parser, compiler, interpreter, and JIT compiler. A full engine inside the JS engine. → 3 out of 5 major runtimes (Chrome, Firefox, Deno) now run Irregexp. Only Safari and Bun take a different path with YARR. → The ECMA-262 spec defines regex matching through continuation-passing style, the same mechanism behind generators, algebraic effects, and shift/reset. → A single regex took down Cloudflare's global network for 27 minutes in 2019. The pattern: nested quantifiers creating 2^n checkpoint combinations. → .test() is 30-60% faster than .match(). Backreferences are 2-4x slower than literals and are the only feature that disables V8's linear-time safety net. → Before reaching for regex, ask: is this a pattern-matching problem or a dictionary-lookup problem? A Trie or a Set might be faster and immune to ReDoS. → The patterns we write are instructions to a compiler. A well-written regex skips 90% of the input via Boyer-Moore. A poorly-written one creates an exponential backtracking loop. If you've ever wondered why some regex patterns freeze your browser while others fly, this article will show you exactly why. Happy reading! 😊 📚 🚀 🌺 https://lnkd.in/eg4zpYq8 #JavaScript #RegExp #V8 #WebPerformance #SoftwareEngineering
To view or add a comment, sign in
-
I worked on a small JavaScript exercise focused on password validation using regex and conditional logic. The function returns an object with the password and its strength level (“Weak”, “Medium”, or “Strong”). #javascript #backend #coding #learninginpublic
To view or add a comment, sign in
-
-
Most JavaScript developers know V8 compiles their code. Far fewer know that when their code calls Math.random(), V8 doesn't generate the number in its main interpreter. 🤔 It hands the work to a dedicated module with its own state, its own algorithm, and a buffer of 64 pre-computed values invisible to JavaScript code. The same architectural pattern V8 uses for regular expressions, where Irregexp takes over the moment the runtime sees a /pattern/. The algorithm is xorshift128+, designed by Sebastiano Vigna in 2014. Three shifts, three XORs, one addition, on a 128-bit state. Fast enough to run at ~90 nanoseconds per call. Statistically excellent: passes BigCrush, the gold-standard test suite. And cryptographically broken by design: an attacker who observes three Math.random() outputs can recover the full internal state with a Z3 solver in under a second, then predict every future output. This is not a theoretical concern. CVE-2025-7783 (CVSS 9.4 critical, July 2025) hit form-data, a transitive dependency in millions of weekly npm downloads, because it generated multipart boundaries with Math.random(). Three observations, one Z3 query, one HTTP Parameter Pollution attack. The bug had been there for years. The deeper insight: Math.random() is not a random number generator. It is a deterministic state machine that produces the illusion of randomness. Every major engine (V8, JavaScriptCore, SpiderMonkey) converged on the same algorithm in 2015-2016. Knowing what's behind the function is the difference between code that happens to work and code we understand. The full deep dive, with Z3 code, hex traces, IEEE 754 bit-layout, tinybench numbers, and the TC39 proposals on the way: 👉 https://lnkd.in/eFYXuswp Four links worth reading alongside it: → V8's own write-up on the xorshift128+ migration: https://lnkd.in/eD4uDQJ4 → Vigna's xorshift+ paper (the algorithm itself): https://lnkd.in/eSBFszd6 → The CVE-2025-7783 advisory: https://lnkd.in/eGF5wBUW → The state-recovery PoC by PwnFunction: https://lnkd.in/eEAr3CFX https://lnkd.in/eFYXuswp Happy reading and discovering! 😊🚀📚 #javascript #nodejs #typescript #webdev #softwareengineering #security
To view or add a comment, sign in
-
Backtracking: Combination Sum Problem Day 4 👈 Problem: - Given an array of numbers and a target value, find all unique combinations where the numbers sum up to the target. 🧠 Summary (Simple Understanding) Think of it like: "Pick a number → reduce target → try again → backtrack → try next number" This pattern helps you explore all possibilities efficiently without duplicates. #DataStructures #Algorithms #Backtracking #Recursion #TypeScript #JavaScript #CodingInterview #DSA #LeetCode #ProblemSolving #SoftwareEngineering
To view or add a comment, sign in
-
-
shipped wyscan v1.4.0-beta today. TypeScript and JavaScript agentic systems are now fully supported, on par with Python. for context, wyscan is a static analysis tool that scans your agent codebase and surfaces AFB04 violations before they hit production. AFB04 is the unauthorized action boundary: the point where an agent executes something it was never supposed to be allowed to do. tool calls without policy gates, execution paths with no authorization check, actions that bypass the enforcement layer entirely. wyscan finds them at the code level, before your agent is ever deployed. Until now, that coverage was Python-only. if your stack was TypeScript or JavaScript - LangChain.js, Mastra, any TS/JS agent framework - you were flying blind. v1.4.0-beta closes that gap. wyscan now scans TS/JS agentic systems the same way it handles Python. same detection logic, same CEE-formatted output, same class of findings. if an unauthorized action boundary violation exists in your agent code, it surfaces, regardless of whether you're on the Python or JS/TS side. this release also fixes and upgrades several Python-side limitations from earlier versions. the output is cleaner, the detection is more accurate, and there's less noise in the results. this is beta, so there will be rough edges. but the core detection works, the findings are real, and the coverage is there. if you're building agentic systems in TS or JS and want to know what wyscan finds in your stack, now you can. https://lnkd.in/dny8Q5tF #buildinpublic #agentsecurity #aiagents #llmsecurity #opensource #wyscan #plarix #typescript #javascript #agentic
To view or add a comment, sign in
-
-
Generate All Unique Subsets Day 3 👈 - First, sort the array - While generating subsets, skip duplicate elements at the same recursion level - This approach uses backtracking to explore all subset possibilities while maintaining uniqueness. Key Idea Use backtracking to build subsets step by step Add the current subset (path) to the result at every step Skip duplicates using: if (i > start && nums[i] === nums[i - 1]) continue; 👉 Time Complexity: O(2ⁿ) 👉 Space Complexity: O(n) (excluding result) #Subsets #PowerSet #Combinatorics #DuplicateHandling #DFS #Backtracking #Recursion #DSA #Algorithms #Subsets #PowerSet #LeetCode #ProblemSolving #CodingInterview #JavaScript #TypeScript #Angular
To view or add a comment, sign in
-
-
🚀 Day 968 of #1000DaysOfCode ✨ Types of Loops in JavaScript (Explained Simply) Loops are one of the most fundamental concepts in JavaScript — but choosing the right one can make a big difference in your code. In today’s post, I’ve explained the different types of loops in JavaScript in a simple and practical way, so you can understand when to use each one. From `for` and `while` to `for...of` and `for...in`, each loop has its own purpose depending on how you’re working with data. Using the right loop not only makes your code cleaner but also improves readability and performance in many cases. This is one of those basics that every developer uses daily — but mastering it helps you write much better code. If you’re working with arrays, objects, or complex data structures, this is something you should be confident about. 👇 Which loop do you use the most in your day-to-day coding? #Day968 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #CodingCommunity #JSBasics
To view or add a comment, sign in
-
👉 If you're writing modern JavaScript, these 10 underrated features can instantly improve your code 👇 💡 Optional Chaining ("?.") → Stop “cannot read property of undefined” errors 💡 Nullish Coalescing ("??") → Smarter defaults (without breaking "0" or """") 💡 Array.at() → Clean way to access last elements 💡 structuredClone() → Proper deep copy (no hacks) 💡 Promise.any() → First successful API wins 💡 Object.hasOwn() → Safer property checks 💡 replaceAll() → Replace all matches without regex 💡 Top-Level Await → Cleaner async code in modules 💡 Logical Assignment ("||=", "&&=", "??=") → Write less, do more 💡 WeakMap / WeakSet → Memory-efficient data handling 🔥 These aren’t “advanced” features — They’re modern JavaScript essentials in 2026. --- 💬 Curious — Which one are you already using in production? And which one is new for you? --- #JavaScript #WebDevelopment #Frontend #FullStackDeveloper #Coding #SoftwareEngineering #TechJobs
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development