nodes-php / validation by nodes

Makes it easier to work with validation in Laravel
13,555
3
2
Package Data
Maintainer Username: nodes
Maintainer Contact: moru@nodes.dk (Morten Rugaard)
Package Create Date: 2016-01-07
Package Last Update: 2020-02-14
Home Page: http://nodesagency.com
Language: PHP
License: MIT
Last Refreshed: 2024-03-24 03:03:37
Package Statistics
Total Downloads: 13,555
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 2
Total Open Issues: 0

Validation

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

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