Skip to content

Commit

Permalink
feat: enhance Telegram URL regex (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcshzj authored Jul 5, 2024
1 parent 6deb327 commit 27a0dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PERMALINK_REGEX = "^((/([a-zA-Z0-9]+-)*[a-zA-Z0-9]+)+)/?$"
export const URL_REGEX_PREFIX = "^(https://)?(www.)?("
export const URL_REGEX_SUFFIX = ".com/)([a-zA-Z0-9_-]+([/.])?)+$"
export const YOUTUBE_REGEX = ".com/(@)?)([a-zA-Z0-9_-]+([/.])?)+$"
export const TELEGRAM_REGEX = "telegram|t).me/([a-zA-Z0-9_-]+([/.])?)+$"
export const TELEGRAM_REGEX = "telegram|t).me/\\+?([a-zA-Z0-9_-]+([/.])?)+$"
export const TIKTOK_REGEX = ".com/@)([a-zA-Z0-9_-]+([/.])?)+$"
// Linkedin doesn't seem to restrict special characters
export const LINKEDIN_REGEX = ".com/).+$"
Expand Down

0 comments on commit 27a0dc6

Please sign in to comment.