isURL
Checks whether a string is a syntactically valid URL.
Returns: boolean
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | required | - | The value to check. |
Usage
Example: Validate URL
const url = 'https://www.example.com';
const isValidURL = nfsfu234FormValidation.isURL(url);
console.log(isValidURL); // trueLast updated on