Download the PHP package wijoc/validify-mi without Composer

On this page you can find all versions of the php package wijoc/validify-mi. 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 validify-mi

Validify-MI

Standalone PHP Validation that is compatible with procedural PHP and WordPress. This project provides a set of validation rules to simplify data validation in your projects, along with data sanitization specifically for WordPress projects. Heavily influenced by Laravel validation and rakit/validation, this project originated from a personal need and is still in beta development. All inputs are highly appreciated.

Table of Contents

Features

Installation

You can install the library via Composer:

Usage

Here is how you use the validation using ::make function. Validator::make has 4 arguments :

  1. Input that you want to validate.
  2. Rules of validation.
  3. Custom validation message.
  4. Sanitizion rules. (for now only available for wordpress project) All arguments should be an array.

Also you can validate nested input with :

Explanation

First, we prepare all the necessary parameters to initialize the validator.

  1. Input to validate :

  2. Validation rules :

  3. Custom validation message :

    Next, we initialize it with the Validator::make() function using the prepared arguments.

    Afterwards, we can check if the input is validated or not using either the validate() or fails() function: validate() will return true if all input is validated, and false if input is not validated.

    or On the other hand, fails() will return false if input is validated, and true if all input is not validated.

    Example :

    If the data is not validated, we can retrieve all errors using the errors('all') function. The 'all' argument is required to get all errors.

    Alternatively, if you only want to get the first error, you can use the firstOfAll() method on top of the errors() function. Please note: If you use firstOfAll(), you don't need to add the 'all' argument to the errors() function.

    Finally, you can get your validated input with the validated() function. validated() function will return an array of input if all data is validated, or an empty array if the data is not validated.

    Additionally, if you are working on a WordPress project, you can use the sanitization feature. Check here for the sanitization feature.

Validation Rules

Sanitisation

Sanitisation currently only works for WordPress projects, so it uses WordPress' default sanitizer functions. Usage :


All versions of validify-mi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0 || ^8.1 || ^8.2
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 wijoc/validify-mi contains the following files

Loading the files please wait ....