isURL
The isURL function is used to validate whether a given string is a valid URL.
Works in: HTML5, React JS, Node.js
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | undefined | The string to validate as a URL. |
Usage
Example: Validate URL
const url = 'https://www.example.com';
const isValidURL = nfsfu234FormValidation.isURL(url);
console.log(isValidURL); // trueSee also
Last updated on