bruno-fernandes/laravel-twitter-handle-validation

1.0.5 2020-03-17 13:04 UTC

This package is auto-updated.

Last update: 2024-09-17 23:02:13 UTC


README

Latest Version on Packagist CircleCI CodeCoverage Quality Score Total Downloads

Simple twitter handle validation.

Installation

You can install the package via composer:

composer require bruno-fernandes/laravel-twitter-handle-validation

Usage

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.'
];

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email security@brunofernandes.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.