Skip to content

Commit c7d59d7

Browse files
Merge pull request #1621 from topcoder-platform/PM-971
PM-971 Allow hyphen in url - asset library
2 parents ffaa101 + 374be0c commit c7d59d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const taaSProjectFormValidationSchema = Yup.object({
5858
/**
5959
* regex for url validation
6060
*/
61-
const urlRegex = /((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z]{2,}){1,3}(#?\/?(?:[a-zA-Z0-9#]+))*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/
61+
const urlRegex = /((https?):\/\/)?(www\.)?[\w-]+(\.[a-z]{2,}){1,3}(#?\/?(?:[a-zA-Z0-9#-]+))*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/
6262

6363
/**
6464
* validation schema for add link form in assets library

0 commit comments

Comments
 (0)