Skip to content

Commit

Permalink
fix: update validation for GitHub username (#4046)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Aug 27, 2024
1 parent 3527795 commit 8a77fac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/url-validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Example ok slugs:
* - opensauced
* - 123open-sauced123
* - github-actions[bot]
*
* Example unallowed, escaped slugs:
* - open.sauced
Expand All @@ -12,7 +13,7 @@
*/

function isValidUrlSlug(value: string): boolean {
const validPattern = /^[a-zA-Z0-9-_]+$/;
const validPattern = /^[a-zA-Z0-9-_\[\]]+$/;

return validPattern.test(value);
}
Expand Down

0 comments on commit 8a77fac

Please sign in to comment.