Download the PHP package wepesi/validation without Composer

On this page you can find all versions of the php package wepesi/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?
wepesi/validation
Rate from 1 - 5
Rated 4.00 based on 1 reviews

Informations about the package validation

WEPESI VALIDATION

Validate your input value with a simple model tools.

INTEGRATION

The integration is the simple thing to do. First you need to define the rule of the input data, and easy way to do so is by using a schema model which help handle all the process, then create an instance of Validate which will help validate data input according to rules already defined. While have the instance of validation, you can access check method, with take two parameters, the source and rules; The schema will be used to generate the model for each data type validate, and to validate will define the result of the data field checked.

in the example bellow, for the first rule

Methods

any

In case there you don't want to validate data sent, use this method, it will not be taken into consideration but the field should be defined.

string

use this method your string value, it has built in method for different scenario such:

supported url :

In the example bellow, you can see a complete procured on how to validate data-source

After generating the schema, now it is required to validate the schema data information, from the validate instance object three method are available to do all the operation:

number

validate integer is now quite difficult, but it required to be consistent in what you are doing.

date

validate your date(datetime) not yet full supported

boolean

validate boolean.

array

use this method to validate your array data object.

In some case the array can have children, and method, the array module as also it own method to control elements,

Validation Schema

The method take an array of a schema generated. In case you want to validate array with string content use string from array schema Note: while using array you can not use string method or number with structure at the sametime it will cause an error, event you can not use string with number at once, it should be one or another.

This will throw an error, each one should be used separately. You can check the example folder then you can get all exercises for each method.

Enjoy :)


All versions of validation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
wepesi/optionsresolver Version ^0.2.0
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 wepesi/validation contains the following files

Loading the files please wait ....