PHP code example of bruno-fernandes / laravel-twitter-handle-validation
1. Go to this page and download the library: Download bruno-fernandes/laravel-twitter-handle-validation library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bruno-fernandes / laravel-twitter-handle-validation example snippets
php
use Illuminate\Support\Facades\Validator;
$validator = Validator::make(['handle' => '@ invalid'], ['handle' => 'twitter_handle']);
if ($validator->fails()) {
// twitter handle validation failed
}
php
return [
'twitter_handle' => 'Twitter handle is not valid.'
];