𝐃𝐚𝐲 𝟐𝟎 of 100DaysOfCode

  • 𝘼𝙜𝙚 𝘾𝙖𝙡𝙘𝙪𝙡𝙖𝙩𝙤𝙧 -

The Age Calculator takes a user’s date of birth and calculates their exact age in years, months, and days. It’s a simple yet practical tool that showcases date manipulation and calculation in JavaScript.

I learned in this project about the date class and how to handle various date formats.

3 Likes

𝐃𝐚𝐲 𝟐𝟏 of 100DaysOfCode

  • 𝘾𝙞𝙧𝙘𝙪𝙡𝙖𝙧 𝙋𝙧𝙤𝙜𝙧𝙚𝙨𝙨 𝘽𝙖𝙧 -

The Circular Progress Bar visually represents progress or completion status using a circular graphic. This type of progress bar is commonly used in dashboards, fitness trackers, and more.

I learned how to create circular shapes and animations using CSS and SVG (using stroke and stroke-dasharray to animate the SVG), dynamically update the progress value with JavaScript, and implement smooth transitions and animations for visual appeal.
Additionally, I tackled handling edge cases to ensure the progress bar functions correctly at all values.

4 Likes

𝐃𝐚𝐲 𝟐𝟐 of #100DaysOfCode

  • 𝙏𝙤𝙖𝙨𝙩 𝙉𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣 -

The Toast :bread: or Snackbar :chocolate_bar: Notification is a small, temporary pop-up message that appears at the bottom or top of the screen to inform users of an event or action. It’s a subtle way to provide feedback without interrupting the user experience.

Today, I focused on creating a responsive and animated toast notification using HTML, CSS, and JavaScript. I explored different ways to trigger the notification, control its duration, and apply smooth fade-in and fade-out effects. Additionally, I learned how to handle multiple notifications and ensure they stack correctly without overlapping.

3 Likes

𝐃𝐚𝐲 𝟐𝟑 of #100DaysOfCode

  • 𝘿𝙧𝙖𝙜 & 𝘿𝙧𝙤𝙥 -

Today, I built a Drag and Drop interface that allows users to move elements around on the page with a simple drag action. This feature is commonly used in interactive lists, image galleries, and customizable dashboards to enhance user experience.

I learned how to implement drag-and-drop functionality using the native HTML5 Drag and Drop API, combined with JavaScript to handle drag events. I also explored how to create smooth and intuitive interactions, manage drop zones, and ensure that elements are placed correctly after being dropped. Additionally, I worked on improving the visual feedback during the drag process to make the interface more user-friendly.

3 Likes

𝐃𝐚𝐲 𝟐𝟒 of #100DaysOfCode

  • 𝙏𝙞𝙘 𝙏𝙖𝙘 𝙏𝙤𝙚 𝙂𝙖𝙢𝙚 -

Today, I developed a classic Tic Tac Toe game where two players can compete to get three in a row. It’s a fun project that combines logic, strategy, and interactive gameplay.

I learned how to implement the game logic for detecting wins, losses, and draws, as well as how to dynamically update the game board using JavaScript. I also explored techniques for resetting the game, tracking player turns, and enhancing the user interface to make the game more engaging. It was a great exercise in structuring code for clarity and reusability.

3 Likes

𝐃𝐚𝐲 𝟐𝟓 of #100DaysOfCode :tada:

  • 𝙎𝙥𝙞𝙣 𝙒𝙝𝙚𝙚𝙡 -

I built a Spin Wheel game today where users can spin the wheel to land on random values that might represent prizes or outcomes. To create the spin wheel, I leveraged Chart.js, a powerful JavaScript library that simplifies the process of creating various types of charts and visualizations.

I learned how to use Chart.js to create a visually appealing spin wheel, taking advantage of its pie chart functionality to represent the different segments. I explored customizing the chart to rotate and simulate spinning, as well as adding animations and interactivity to make the experience more engaging. Integrating Chart.js into this project made it easier to handle the visual aspects, allowing me to focus more on the game logic and user experience.

3 Likes

𝐃𝐚𝐲 𝟐𝟔 of #100DaysOfCode

  • 𝙄𝙢𝙖𝙜𝙚 𝘾𝙤𝙢𝙥𝙖𝙧𝙞𝙨𝙞𝙤𝙣 𝙎𝙡𝙞𝙙𝙚𝙧 -

I built an Image Comparison Slider today, a tool that allows users to compare two images by sliding a handle back and forth. This type of slider is commonly used to highlight before-and-after scenarios, such as in photo editing or product comparisons.

I learned how to implement a draggable slider using JavaScript to control the width of the images dynamically. I also explored techniques for creating a smooth and responsive sliding experience, ensuring the images align correctly as the user interacts with the slider. This project was a great exercise in combining CSS for layout and JavaScript for interactivity.

2 Likes

𝐃𝐚𝐲 𝟐𝟕 of #100DaysOfCode

  • 𝙃𝙖𝙣𝙜𝙢𝙖𝙣 -

I created a Hangman game today, a classic word-guessing challenge where players try to figure out a hidden word by guessing letters. With each incorrect guess, a part of the hangman figure is drawn, and the game ends if the figure is fully drawn before the word is guessed.

I learned how to implement game logic for tracking correct and incorrect guesses, updating the displayed word, and managing the state of the hangman figure. I also explored ways to make the game more interactive by adding visual feedback for the player. This project was a fun dive into creating a simple yet engaging game with JavaScript.

3 Likes

𝐃𝐚𝐲 𝟐𝟖 of #100DaysOfCode

  • 𝘼𝙡𝙖𝙧𝙢 𝘼𝙥𝙥 𝙬𝙞𝙩𝙝 𝙈𝙪𝙡𝙩𝙞𝙥𝙡𝙚 𝘼𝙡𝙖𝙧𝙢𝙨 -

I built an Alarm App today that allows users to set multiple alarms with custom times. This feature-rich app lets you schedule various alarms for different tasks throughout the day, ensuring you stay on top of your schedule.

I learned how to work with the JavaScript 𝘋𝘢𝘵𝘦 object to track time and trigger alarms accurately. By comparing the current time with the set alarm times, I was able to implement a system that efficiently handles multiple alarms without relying on timers like 𝘴𝘦𝘵𝘛𝘪𝘮𝘦𝘰𝘶𝘵 or 𝘴𝘦𝘵𝘐𝘯𝘵𝘦𝘳𝘷𝘢𝘭. This approach provided a deeper understanding of date and time manipulation in JavaScript.

3 Likes

𝐃𝐚𝐲 𝟐𝟗 of #100DaysOfCode

  • 𝙎𝙡𝙞𝙙𝙞𝙣𝙜 𝙄𝙢𝙖𝙜𝙚 𝙋𝙪𝙯𝙯𝙡𝙚 -

I developed a Sliding Image Puzzle today, where users can rearrange pieces of an image by sliding them into the correct position to complete the picture. It’s a fun and challenging game that tests both logic and spatial reasoning.

I learned how to break an image into smaller pieces and manage their positions using JavaScript. I implemented logic for detecting valid moves and ensuring that only adjacent pieces can slide into the empty space. This project also gave me the opportunity to work on enhancing the user interface, making the puzzle visually appealing and intuitive to interact with.

3 Likes

𝐃𝐚𝐲 𝟑𝟎 of #100DaysOfCode :tada:

  • 𝙈𝙞𝙣𝙚𝙨𝙬𝙚𝙚𝙥𝙚𝙧 :bomb: -

This time, I created a Minesweeper game! :rocket:
A classic puzzle game where players uncover cells on a grid while avoiding hidden mines. The goal is to clear the board without detonating any mines, using numbered clues to determine the locations of the mines.

I learned a lot when creating this complex game, from implementing game logic for generating a randomized grid with mines and numbers, to managing game states.

  • 𝗦𝗼𝗺𝗲 𝗜𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁𝗲𝗱 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀:
    → Different difficulty levels each with a specific number of mines and grid size.
    → Custom difficulty (popup) where you can specify the height, width and number of mines.
    → Timer & high scores for each difficulty to track performance.
    → Explosion sound is played when you land on a mine. :bomb:

A feature that’s 𝙣𝙤𝙩 𝙞𝙢𝙥𝙡𝙚𝙢𝙚𝙣𝙩𝙚𝙙 yet:
→ Right clicking to add a flag that marks the cell as a potential mine and stops you from accidentally clicking on the cell.

Feel free to try the game and give some feedback. :hugs:

3 Likes

𝐃𝐚𝐲 𝟑𝟏 of #100DaysOfCode

  • 𝑵𝒐𝒅𝒆.𝑱𝑺 -

Node.js is a game-changer for developers who want to build fast, scalable applications. With its asynchronous, event-driven architecture and non-blocking I/O, Node.js handles multiple operations with ease, making it perfect for real-time applications like chat apps and online games.

𝗪𝗵𝗮𝘁 𝗶𝘀 𝗡𝗼𝗱𝗲.𝗷𝘀?
Node.js is a runtime environment that allows you to execute JavaScript code outside of a web browser. It’s built on the V8 JavaScript engine, which is the same engine that powers Google Chrome, making it incredibly fast and efficient.

~Here are some key points about Node.js:
->𝐀𝐬𝐲𝐧𝐜𝐡𝐫𝐨𝐧𝐨𝐮𝐬 𝐚𝐧𝐝 𝐄𝐯𝐞𝐧𝐭-𝐃𝐫𝐢𝐯𝐞𝐧:
Node.js is designed to handle many operations at once. Instead of waiting for tasks to complete, it moves on to other tasks and deals with the results when they’re ready. This makes it highly efficient for I/O-heavy tasks.
->𝐍𝐨𝐧-𝐁𝐥𝐨𝐜𝐤𝐢𝐧𝐠 𝐈/𝐎:
This feature allows Node.js to handle multiple connections at the same time without the need to create a new thread for each connection, making it lightweight and scalable.
->𝐒𝐢𝐧𝐠𝐥𝐞-𝐓𝐡𝐫𝐞𝐚𝐝𝐞𝐝:
Despite being able to handle multiple operations concurrently, Node.js uses a single thread to process tasks. This might seem counterintuitive, but thanks to its event-driven architecture, it can manage thousands of connections at once.
->𝐂𝐫𝐨𝐬𝐬-𝐏𝐥𝐚𝐭𝐟𝐨𝐫𝐦:
Node.js is compatible with various operating systems, including Windows, Linux, and macOS.
->𝐑𝐢𝐜𝐡 𝐄𝐜𝐨𝐬𝐲𝐬𝐭𝐞𝐦:
The Node Package Manager (npm) offers a vast collection of libraries and tools, making development faster and easier.

If you’re exploring backend development, Node.js is definitely worth your time. It’s cross-platform, powerful, and widely used in the industry.

2 Likes

𝐃𝐚𝐲 𝟑𝟐 of #100DaysOfCode

  • 𝑻𝒉𝒆 𝑰𝒎𝒑𝒐𝒓𝒕𝒂𝒏𝒄𝒆 𝒐𝒇 𝑶𝒓𝒈𝒂𝒏𝒊𝒛𝒆𝒅 𝑭𝒊𝒍𝒆𝒔 𝒊𝒏 𝑵𝒐𝒅𝒆.𝒋𝒔 𝑷𝒓𝒐𝒋𝒆𝒄𝒕𝒔 -

Whether you’re just starting out or scaling up a project, the way you structure your files and folders in Node.js can make or break your development process. Here’s why it matters:

→ 𝐌𝐚𝐢𝐧𝐭𝐚𝐢𝐧𝐚𝐛𝐢𝐥𝐢𝐭𝐲: A clean and logical structure helps you quickly locate files, making updates and debugging more efficient.

→ 𝐒𝐜𝐚𝐥𝐚𝐛𝐢𝐥𝐢𝐭𝐲: A clear structure supports the growth of your project. When adding new features or modules, a well-organized directory system allows for seamless integration without cluttering your codebase.

→ 𝐂𝐨𝐥𝐥𝐚𝐛𝐨𝐫𝐚𝐭𝐢𝐨𝐧: Working with a team? A standardized file structure ensures everyone’s on the same page. It reduces onboarding time for new developers and makes code reviews more efficient.

→ 𝐁𝐞𝐬𝐭 𝐏𝐫𝐚𝐜𝐭𝐢𝐜𝐞𝐬: Following conventions like placing controllers, models, and routers in their respective directories not only keeps your project clean but also aligns with industry standards, making your project easier to understand for others.

→ 𝐄𝐫𝐫𝐨𝐫 𝐑𝐞𝐝𝐮𝐜𝐭𝐢𝐨𝐧: Properly organizing your files helps in avoiding circular dependencies, incorrect imports, and other common errors that can arise from a disorganized codebase.

Organizing your project isn’t just about aesthetics—it’s about creating a solid foundation for sustainable development.

2 Likes

𝐃𝐚𝐲 𝟑𝟒 of #100DaysOfCode

  • 𝑴𝒐𝒏𝒈𝒐𝑫𝑩 𝑺𝒄𝒉𝒆𝒎𝒂𝒔 -

If you’re working with Node.js and MongoDB, understanding Mongoose schemas is crucial for creating robust and scalable applications. Mongoose schemas act as blueprints, defining the structure and rules for your data.

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬:
→ 𝐅𝐢𝐞𝐥𝐝 𝐓𝐲𝐩𝐞𝐬: Define the data types of each field (String, Number, Date, etc.).
→ 𝐕𝐚𝐥𝐢𝐝𝐚𝐭𝐢𝐨𝐧: Enforce rules like required fields, value limits, and custom logic.
→ 𝐈𝐧𝐝𝐞𝐱𝐞𝐬: Improve query performance with schema-defined indexes.
→ 𝐕𝐢𝐫𝐭𝐮𝐚𝐥𝐬: Virtuals are fields that don’t get persisted to the database but can be used in code, often for computed properties.
→ 𝐌𝐞𝐭𝐡𝐨𝐝𝐬: Custom instance methods can be added to the schema to perform operations on documents.

The attached schema defines a User model with fields for name, email, age, and a timestamp for when the document is created. It’s a powerful way to enforce data integrity and enhance your MongoDB queries.
1723496128433

1 Like

𝐃𝐚𝐲 𝟑𝟓 of #100DaysOfCode

  • 𝑱𝑾𝑻 𝒂𝒏𝒅 𝑯𝑻𝑻𝑷 𝑺𝒕𝒂𝒕𝒖𝒔 𝑪𝒐𝒅𝒆𝒔 𝒊𝒏 𝑵𝒐𝒅𝒆.𝒋𝒔 -

When working with JSON Web Tokens (JWT) in Node.js, understanding how various HTTP status codes relate to authentication and authorization processes is crucial. These status codes help communicate the result of client-server interactions, particularly when handling user access and security.

Here’s a comprehensive guide to the HTTP status codes you’ll frequently encounter when implementing JWT in your applications:

:unlock: 𝟐𝟎𝟎 𝐎𝐊: 𝐒𝐮𝐜𝐜𝐞𝐬𝐬! Your request was processed, and the JWT is valid, granting access to the resource.

:new: 𝟐𝟎𝟏 𝐂𝐫𝐞𝐚𝐭𝐞𝐝: A new resource has been successfully created, such as a user account, and a JWT is issued.

:warning: 𝟒𝟎𝟎 𝐁𝐚𝐝 𝐑𝐞𝐪𝐮𝐞𝐬𝐭: The server couldn’t understand the request due to invalid syntax. This might happen if the request lacks necessary parameters or the JWT is malformed.

:no_entry_sign: 𝟒𝟎𝟏 𝐔𝐧𝐚𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐞𝐝: Access denied. This occurs when the JWT is missing, expired, or invalid, meaning authentication has failed.

:no_pedestrians: 𝟒𝟎𝟑 𝐅𝐨𝐫𝐛𝐢𝐝𝐝𝐞𝐧: You’re authenticated, but you don’t have the right permissions to access this resource, even with a valid JWT.

:question: 𝟒𝟎𝟒 𝐍𝐨𝐭 𝐅𝐨𝐮𝐧𝐝: The requested resource couldn’t be found. This isn’t specific to JWT but is often encountered in API development.

:hourglass_flowing_sand: 𝟒𝟏𝟗 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐓𝐢𝐦𝐞𝐨𝐮𝐭: The session has expired, often due to a JWT that is no longer valid because of expiration.

:clipboard: 𝟒𝟐𝟐 𝐔𝐧𝐩𝐫𝐨𝐜𝐞𝐬𝐬𝐚𝐛𝐥𝐞 𝐄𝐧𝐭𝐢𝐭𝐲: The server understands the request but can’t
process it due to semantic errors, like an invalid JWT payload.

:warning: 𝟓𝟎𝟎 𝐈𝐧𝐭𝐞𝐫𝐧𝐚𝐥 𝐒𝐞𝐫𝐯𝐞𝐫 𝐄𝐫𝐫𝐨𝐫: Something went wrong on the server, possibly during JWT processing or verification.

:construction: 𝟓𝟎𝟑 𝐒𝐞𝐫𝐯𝐢𝐜𝐞 𝐔𝐧𝐚𝐯𝐚𝐢𝐥𝐚𝐛𝐥𝐞: The server is currently unable to handle the request, which could affect JWT validation or issuance.
1723571287952

2 Likes

𝐃𝐚𝐲 𝟑𝟔 of #100DaysOfCode

  • 𝑭𝒓𝒐𝒎 𝑺𝒄𝒉𝒆𝒎𝒂 𝒕𝒐 𝑴𝒐𝒅𝒆𝒍 -

After defining a schema, the next step is to create a model. A model in Mongoose provides an interface to the database for CRUD (Create, Read, Update, Delete) operations. It’s the bridge between your code and the database.

-𝐖𝐡𝐲 𝐮𝐬𝐞 𝐦𝐨𝐝𝐞𝐥𝐬?
Models are where the magic happens! They allow you to interact with the MongoDB collection that corresponds to the defined schema, making data handling straightforward and efficient.

Attached is an example a model User is created from the schema and exported to be used in other files. Then this model is used to create and save a new user to the database.

𝘕𝘦𝘹𝘵 𝘶𝘱: 𝘏𝘰𝘸 𝘵𝘰 𝘤𝘳𝘦𝘢𝘵𝘦 𝘢𝘯𝘥 𝘪𝘯𝘴𝘦𝘳𝘵 𝘥𝘰𝘤𝘶𝘮𝘦𝘯𝘵𝘴 𝘪𝘯𝘵𝘰 𝘺𝘰𝘶𝘳 𝘔𝘰𝘯𝘨𝘰𝘋𝘉 𝘤𝘰𝘭𝘭𝘦𝘤𝘵𝘪𝘰𝘯 𝘸𝘪𝘵𝘩 𝘦𝘢𝘴𝘦.

2 Likes

𝐃𝐚𝐲 𝟑𝟕 of #100DaysOfCode

  • 𝑪𝒓𝒆𝒂𝒕𝒊𝒏𝒈 𝑫𝒐𝒄𝒖𝒎𝒆𝒏𝒕𝒔 𝒘𝒊𝒕𝒉 𝑴𝒐𝒏𝒈𝒐𝒐𝒔𝒆 -

Creating documents in MongoDB is a breeze with Mongoose. The 𝒄𝒓𝒆𝒂𝒕𝒆 function allows you to insert new documents into your collection, using the model you’ve defined.

𝐖𝐡𝐲 𝐢𝐬 𝐭𝐡𝐢𝐬 𝐮𝐬𝐞𝐟𝐮𝐥?
The create function not only saves the data to the database but also returns the saved document, making it easy to confirm the operation or use the result in your code.

In the attached snippet, the 𝘜𝘴𝘦𝘳.𝘤𝘳𝘦𝘢𝘵𝘦 method inserts a new document into the User collection and returns the saved document in the promise.

2 Likes

𝐃𝐚𝐲 𝟑𝟖 of #100DaysOfCode

  • 𝑭𝒊𝒏𝒅𝒊𝒏𝒈 𝑫𝒐𝒄𝒖𝒎𝒆𝒏𝒕𝒔 𝒊𝒏 𝑴𝒐𝒏𝒈𝒐𝑫𝑩 𝒘𝒊𝒕𝒉 𝑴𝒐𝒏𝒈𝒐𝒐𝒔𝒆 -

One of the most powerful features of Mongoose is its ability to query your database with ease. The 𝐟𝐢𝐧𝐝 function is a versatile tool that allows you to search for documents that match certain criteria.

𝐖𝐡𝐲 𝐢𝐬 𝐢𝐭 𝐩𝐨𝐰𝐞𝐫𝐟𝐮𝐥?
With find, you can retrieve multiple documents at once, filter results, and even control what fields are returned. It’s the backbone of many database operations in your application.

In the attached snippet, User.find is used to retrieve all users who are 25 years old. The result is an array of documents that match the query.

2 Likes

𝐃𝐚𝐲 𝟑𝟗 of #100DaysOfCode

  • 𝑸𝒖𝒆𝒓𝒚𝒊𝒏𝒈 𝒖𝒔𝒊𝒏𝒈 𝒇𝒊𝒏𝒅𝑶𝒏𝒆 𝒊𝒏 𝑴𝒐𝒏𝒈𝒐𝒐𝒔𝒆 -

When you want to retrieve a single document that matches specific criteria, Mongoose’s 𝒇𝒊𝒏𝒅𝑶𝒏𝒆 is the function to use. It returns the first document that matches the query or null if no document is found.

𝐖𝐡𝐲 𝐢𝐬 𝐭𝐡𝐢𝐬 𝐮𝐬𝐞𝐟𝐮𝐥?
𝒇𝒊𝒏𝒅𝑶𝒏𝒆 is perfect for scenarios where you’re looking for a unique document or the first match in a collection. It’s a quick way to fetch a single record without needing to filter through an entire array of results.

In the attached snippet, 𝒇𝒊𝒏𝒅𝑶𝒏𝒆 is used to find the first user with the email john@example.com. If no user is found, it returns null.

2 Likes

𝐃𝐚𝐲 𝟒𝟎 of #100DaysOfCode

  • 𝑽𝒂𝒍𝒊𝒅𝒂𝒕𝒐𝒓𝒔 𝒊𝒏 𝑴𝒐𝒏𝒈𝒐𝒐𝒔𝒆 -

When working with Mongoose, validators play a crucial role in ensuring the integrity and correctness of your data. Mongoose offers a variety of validators that can be applied directly to schema fields, and it also allows you to create custom validators to meet specific needs. Let’s dive into the different types of validators you can use in Mongoose.

𝟏. 𝐁𝐮𝐢𝐥𝐭-𝐢𝐧 𝐕𝐚𝐥𝐢𝐝𝐚𝐭𝐨𝐫𝐬
Mongoose provides a set of built-in validators that cover common validation scenarios. These are directly applied to schema fields and handle most validation tasks out of the box.

𝗛𝗲𝗿𝗲’𝘀 𝗮 𝗹𝗼𝗼𝗸 𝗮𝘁 𝘀𝗼𝗺𝗲 𝗰𝗼𝗺𝗺𝗼𝗻 𝗯𝘂𝗶𝗹𝘁-𝗶𝗻 𝘃𝗮𝗹𝗶𝗱𝗮𝘁𝗼𝗿𝘀:
-𝐫𝐞𝐪𝐮𝐢𝐫𝐞𝐝: Ensures a field is not empty.
-𝐦𝐢𝐧 and 𝐦𝐚𝐱: Enforce minimum and maximum values for numbers.
-𝐦𝐢𝐧𝐥𝐞𝐧𝐠𝐭𝐡 and 𝐦𝐚𝐱𝐥𝐞𝐧𝐠𝐭𝐡: Set minimum and maximum lengths for strings.
-𝐞𝐧𝐮𝐦: Restricts a field to a set of predefined values.
-𝐦𝐚𝐭𝐜𝐡: Validates a string against a regular expression pattern.

𝟐. 𝐂𝐮𝐬𝐭𝐨𝐦 𝐕𝐚𝐥𝐢𝐝𝐚𝐭𝐨𝐫𝐬
Sometimes, built-in validators aren’t enough, and you need more control. Mongoose allows you to define custom validators that let you implement complex validation logic.

Custom validators are perfect for scenarios that require specific business rules or logic that isn’t covered by built-in validators.

𝟑. 𝐀𝐬𝐲𝐧𝐜𝐡𝐫𝐨𝐧𝐨𝐮𝐬 𝐕𝐚𝐥𝐢𝐝𝐚𝐭𝐨𝐫𝐬
Sometimes, validation involves operations like checking the uniqueness of a value against the database. Mongoose supports asynchronous validators for these cases.



2 Likes