Download the PHP package filippo-toso/validate-function without Composer

On this page you can find all versions of the php package filippo-toso/validate-function. 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 validate-function

Validation Function

A simple function that helps validating inputs for use in API development.

Requirements

Installing

Use Composer to install it:

Function Signature

Here is the signature of the validate() function:

Using It

Here is the simples example:

If you prefer, you can achieve the same result using the callable in the second parameter:

The third parameter is also a callback that it's called if the validator fails. In this case the instance of the validator is passed as parameter. You can use it, for instance, to generate a custom error payload:

The forth parameter contains the validator's messages (like the third parameter in Validator::make() or the controller's messages() method).

The last parameter can contain null, a Request object or an array. In the first case the current request() will be used otherwise the content passed will be validated. If the input parameter doesn't contain a valid value, an exception will be thrown.


All versions of validate-function with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3 || ^8.0 || ^9.0
illuminate/http Version >=5.5
illuminate/support Version >=5.5
laravel/helpers Version ^1.1
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 filippo-toso/validate-function contains the following files

Loading the files please wait ....