zhanang19/laravel-rules

laravel-rules

v1.0.0 2021-01-17 23:25 UTC

This package is auto-updated.

Last update: 2024-11-14 03:43:23 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package provides a library of reusable validation rules for your Laravel projects.

Installation

You can install the package via composer:

composer require zhanang19/laravel-rules

Usage

use Zhanang19\LaravelRules\Rules\LinkedinUrl;

$request->validate([
    'linkedin_url' => ['required', 'string', new LinkedinUrl],
]);

You can use all available rule directly as Rule object. See https://laravel.com/docs/8.x/validation#using-rule-objects

You must specify the validation rules as an array instead of using the | character to delimit your validation rules

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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