var-lab / url-validator
dev-main
2022-10-26 16:56 UTC
Requires (Dev)
- ext-pcntl: *
- composer/package-versions-deprecated: ^1.11.99.4
- ergebnis/composer-normalize: ^2.15
- jangregor/phpstan-prophecy: ^1.0.0
- mayflower/mo4-coding-standard: ^9.0
- phpspec/prophecy-phpunit: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.4
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-strict-rules: ^1.1
- phpunit/phpunit: 9.5.16
- psalm/plugin-phpunit: ^0.16.1
- slevomat/coding-standard: ^8.4
- squizlabs/php_codesniffer: ^3.7
- thecodingmachine/phpstan-safe-rule: ^1.2
- weirdan/doctrine-psalm-plugin: ^2.0
This package is auto-updated.
Last update: 2025-03-29 01:01:22 UTC
README
A simple php library to validate URLs.
Installation
composer require var-lab/url-validator
Usage
HTTP(S)-Urls:
use VarLab\UrlValidator\UrlValidator;
$validator = new UrlValidator();
$isValid = $validator->validateUrl('https://var-lab.com');
$isValid = $validator->validateUrl('http://var-lab.com');
(s)FTP-Urls:
use VarLab\UrlValidator\UrlValidator;
$validator = new UrlValidator();
$isValid = $validator->validateUrl('ftp://var-lab.com');
$isValid = $validator->validateUrl('sftp://var-lab.com');