Skip to content

Conversation

@ali-m07
Copy link

@ali-m07 ali-m07 commented Dec 1, 2025

This PR adds Facebook username validation to the social category.

  • Implements \ using the shared \ helper
  • Uses the pattern https://www.facebook.com/ for profile URLs
  • Treats HTTP 404 as available and HTTP 200 as taken

@kaifcodec
Copy link
Owner

@ali-m07 Thanks for the PR, great job, it works fine!

One suggestion: Facebook enforces strict username rules (allowed symbols, length, etc.). To make this validator more accurate, could you add a regex-based pre-check before calling status_validate()?

Suggested flow:

  • If the username matches the Facebook pattern → call status_validate()
  • If it doesn’t → return 2 with a clear message explaining what constraint failed

This avoids unnecessary requests and gives the user better feedback.
If you run into any issues with showing the validation error message, feel free to ask, and once updated, you can push the changes here and reopen the PR.

@kaifcodec kaifcodec added the need-extra-changes Some files or parts of the code may require additional edits or updates for it work properly. label Dec 1, 2025
@json-hunter07 json-hunter07 requested review from json-hunter07 and removed request for json-hunter07 December 2, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-extra-changes Some files or parts of the code may require additional edits or updates for it work properly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants