Skip to content

Commit 8b52e59

Browse files
authored
fix: Allow slash at domain end (#1075)
1 parent b395299 commit 8b52e59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ ajv.addFormat('customUrl', {
255255
ajv.addFormat('domain', {
256256
validate: (value: string) => {
257257
if (!value) return false;
258-
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/);
258+
return !!value.match(
259+
/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}(\/)?$/
260+
);
259261
}
260262
});
261263

0 commit comments

Comments
 (0)