Compare commits

...

1 Commits

Author SHA1 Message Date
TheShadowEevee
83246d6a4b fix: increase TLD length regex (#886)
30 matches the Second Level Domain length limit. This should allow for TLDs longer than 2 or 3 characters, such as .solutions

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2025-09-09 16:50:46 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ import { useNavigate } from 'react-router-dom';
import { settingsOnSubmit } from '../settingsOnSubmit';
const DOMAIN_REGEX =
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gim;
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gim;
export default function Domains({
swr: { data, isLoading },

View File

@@ -321,7 +321,7 @@ export default fastifyPlugin(
z
.string()
.regex(
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gi,
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gi,
'Invalid Domain',
),
),