nodes/validation

This package is abandoned and no longer maintained. No replacement package was suggested.

Makes it easier to work with validation in Laravel

1.0.8 2020-02-13 21:47 UTC

README

A validation manager made more flexible validators in Laravel

Total downloads Monthly downloads Latest release Open issues License Star repository on GitHub Watch repository on GitHub Fork repository on GitHub StyleCI

📝 Introduction

Validation is something we take quite serious in Nodes which means we've had cases where the default Laravel validator simply doesn't cut it.

Therefore we've created this little neat package, which makes it super easy to create your own validator and add your own custom rules. By default this package uses our own Validator with our own custom rules, but you can easily swap it out with your own stuff.

📦 Installation

To install this package you will need:

  • Laravel 5.1+
  • PHP 5.5.9+

You must then modify your composer.json file and run composer update to include the latest version of the package in your project.

"require": {
    "nodes/validation": "^1.0"
}

Or you can run the composer require command from your terminal.

composer require nodes/validation:^1.0

🔧 Setup

In Laravel 5.5 or above, service providers and aliases are automatically registered. If you're using Laravel 5.5 or above, skip ahead directly to Publish config files.

Setup service provider in config/app.php

Nodes\Validation\ServiceProvider::class

Publish config files

php artisan vendor:publish --provider="Nodes\Validation\ServiceProvider"

If you want to overwrite any existing config files use the --force parameter

php artisan vendor:publish --provider="Nodes\Validation\ServiceProvider" --force

⚙ Usage

Create a new validator and make it extend Nodes\Validation\Validator.

At a later time, we'll update the documentation with details about each rule this package comes with out-of-the-box. But for now, we recommend you to take a look in the source code and read the DocBlock of each method.

Check out the available rules in the src/Rules directory.

🏆 Credits

This package is developed and maintained by the PHP team at Nodes Agency

Follow Nodes PHP on Twitter Tweet Nodes PHP

📄 License

This package is open-sourced software licensed under the MIT license