Download the PHP package okaybueno/validation without Composer

On this page you can find all versions of the php package okaybueno/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package validation

IMPORTANT ❗

This package has been discontinued and it won't receive any other updates. If you're using it please consider migrating to another solution – or fork it and depend on your own version of package.


ValidationService

A package that provides validation as a service for Laravel 5.x.

Latest Version on Packagist Quality Score Total Downloads

Goal

There is a lot of talk about where to perform the data validation: repositories? controllers? gateways? services? models? Each one has its point; good things and bad things... We personally found useful to extract this logic to a service that can be injected into other services on the same -or higher- layer.

So the goal of this package is to provide a simple validation service that can be injected into other services, and that although it uses the Laravel Validation class by default, it can be extended to use other validation libraries. This is a highly opinionated way of solving this issue.

Installation

  1. Install this package by adding it to your composer.json or by running composer require okaybueno/validation-service in your project's folder.
  2. Publish the configuration file by running php artisan vendor:publish --provider="OkayBueno\Validation\ValidationServiceProvider".
  3. Configure the config/validators.php file according to your needs, specifying the base namespace and directories for your validators.
  4. Ready to go! No service provider or anything else needed :).

Usage

You just need to create a Validation interface with the different validation methods, and then create a new ´src´ directory where you will then create the validation class that extends the main validation class (LaravelValidator) and implements the previous interface. It sounds weird, huh? Lets see it with an example...

Examples

I personally like to split my Laravel code from my app code, so inside the app folder I usually create a folder that includes ALL the business logic that is lowly coupled to the framework: app/MyWebApp. Inside that folder I like to split my files into different folders, based on the role of these: Models? Repositories? Helpers? Services? Validators? And so on...

Once again -and this is a matter of taste, that's all- I like to split my services into areas of responsibility: Users, Auth, Mailing, etc. Therefore, I like to split my validators in different folders that then contain the different interfaces, along with the src folder that contains the implementation. So the folder structure inside my projects looks pretty much like this most of the times:

Let's take a look at how I would implement the UserValidatorInterface and the UserValidator classes:

Vôila! The package does the rest. Now you can inject the Validation service in any part of our app. I like to use ONLY inside other services, something like this...

And that's all! Remember: The important thing is that the interface lives in the folder specified in the configuration file, and that the implementation for that interface lives under the src folder.

Changelog

v2.0.0:
v1.0.0:

Credits

Bugs & contributing

License

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


All versions of validation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
laravel/framework Version >=5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package okaybueno/validation contains the following files

Loading the files please wait ....