Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check / Validate MongoDB URI #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

subhamchbty
Copy link

@subhamchbty subhamchbty commented Jun 22, 2023

The regex pattern checks for the following components in a MongoDB URI:

  • Protocol (mongodb:// or mongodb+srv://)
  • Username and password (optional)
  • Hostname(s) (at least one, with optional port)
  • Database name
  • Optional query parameters

@RajdipM
Copy link
Collaborator

RajdipM commented Jan 26, 2024

@subhamchbty can you please try without using a package .Just do with regex pattern match, that will be great.

@subhamchbty
Copy link
Author

@RajdipM yes, I can do that.

@subhamchbty
Copy link
Author

@RajdipM please check, I have updated the code.

@sunilksamanta
Copy link
Owner

@RajdipM Can you please review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants