Skip to content

Commit ff855cf

Browse files
author
himaniraghav3
committed
Allow hyphen in url - asset library
1 parent ffaa101 commit ff855cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/validation.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +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-%]+&?)?$/
62-
61+
const urlRegex = /((https?):\/\/)?(www\.)?[\w-]+(\.[a-z]{2,}){1,3}(#?\/?([\w-._~:/?#[\]@!$&'()*+,;=]+)*)?\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/
6362
/**
6463
* validation schema for add link form in assets library
6564
*/

0 commit comments

Comments
 (0)