Simple twitter handle validation.
You can install the package via composer:
composer require bruno-fernandes/laravel-twitter-handle-validation
use Illuminate\Support\Facades\Validator;
$validator = Validator::make(['handle' => '@ invalid'], ['handle' => 'twitter_handle']);
if ($validator->fails()) {
// twitter handle validation failed
}
To add a custom validation error message go to views/lang/validation.php file and add:
return [
'twitter_handle' => 'Twitter handle is not valid.'
];
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email security@brunofernandes.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.