Skip to content

Commit 4a251c1

Browse files
fix(url.value-object): change regex hash
1 parent df94678 commit 4a251c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/utils/url.value-object.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ValueObject } from '../core';
22
import { Result } from '../core';
3-
const regexHash = /^\w{3,5}:\/{1,}\w{1,}\.\w*\.?\w{2,}/;
3+
const regexHash =
4+
/^(https?:\/\/)?(([\da-z\.-]+))?\.?([a-z\.]{2,6})([\/\w \.-]*)*\/?(:\d{2,4})?(\/\w+)?$/;
45

56
interface Prop {
67
value: string;

0 commit comments

Comments
 (0)