You can install the package in to a Laravel app that uses Nova via composer:
composer require kukac7/external-url-validator
Add a new ExternalUrlValidator
field to your Nova Resource:
use Kukac7\ExternalUrlValidator\ExternalUrlValidator;
class Link extends Resource
{
// ...
public function fields(Request $request)
{
return [
// ...
ExternalUrlValidator::make('URL', 'url'),
// ...
];
}
}
Set custom validate API url:
ExternalUrlValidator::make('URL', 'url')->apiUrl('http://example.test/api/validate-url'),
If you discover any security related issues, please using the issue tracker.
The MIT License (MIT). Please see License File for more information.
Special thanks to: