fix: Fixed API typo and webhook checkerror (#6779)
## Issue 1.There was an Api typo with API under Developers section #6778 2. Webhook lacked an check method for the `TextInput` #6774 ## After- <img width="649" alt="Screenshot 2024-08-29 at 2 13 21 AM" src="https://github.com/user-attachments/assets/bc9595f8-533f-430e-bc18-56373983eec8"> https://github.com/user-attachments/assets/8e2b06bc-308a-48ad-8ecb-9d0a130877bc --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
8
packages/twenty-front/src/utils/url/isValidUrl.ts
Normal file
8
packages/twenty-front/src/utils/url/isValidUrl.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export const isValidUrl = (url: string) => {
|
||||
const urlRegex =
|
||||
/^(https?:\/\/)?((([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,})|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(localhost))(:\d+)?(\/[^\s]*)?(\?[^\s]*)?$/;
|
||||
|
||||
const urlPattern = new RegExp(urlRegex, 'i');
|
||||
|
||||
return !!urlPattern.test(url);
|
||||
};
|
||||
Reference in New Issue
Block a user