Improve username validation

22 views
2 hours watched
2 completions

Let's validate usernames in real time and create a blacklist of NSFW and other names we don't want to allow.

Video thumbnail

Get full access

You need to subscribe to get full access to the video and lesson content.

Join 4.6K+ learners from companies like Shopify, Microsoft, Tiktok, AppSumo and Instacart.

$197
one-time payment

In this lesson, we'll enhance the create link page component by adding real-time validation for usernames. We'll implement inline checks, a blacklist of forbidden terms, and ensure uniqueness.

Implementing Validation Rules

We'll use AI to help us modify the component to include:

  1. Real-time validation for username uniqueness
  2. A blacklist of prohibited usernames
  3. A minimum character limit for usernames

Testing the Validation

After implementing these changes, we tested the validation:

  1. The "admin" username was successfully blocked.
  2. Usernames less than three characters were rejected.
  3. The inline validation worked as expected.

Further Improvements

We made additional enhancements to the validation:

  1. Hide the validation...

Subscribe now to get full access to the lesson content.

Get started →