2017 © Pedro Peláez
 

library envalid

Server side data/form validation library

image

azi/envalid

Server side data/form validation library

  • Friday, November 17, 2017
  • by azibaloch
  • Repository
  • 5 Watchers
  • 16 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Envalid

Envalid is a framework agnostic and fluent server side form validation package for PHP, (*1)

Build Status, (*2)

Documentation

Installation

Envalid can be installed via composer just execute the following command in your project root, (*3)

composer require azi/envalid, (*4)

Or add the following in your composer.json file and run composer install, (*5)

"require": {
    "azi/envalid": "^1.0"
}

Usage

Using envalid in your project is super simple, here is an example, (*6)

$validator = new azi\Validator();
$validator->validate($_POST, [
    'username'         => 'required',
    'password'         => 'required|password:strong',
    'confirm_password' => 'required|same:password'
]);

If you've files to validate you will need to merge $_POST|$_GET and with $_FILES just like the following, (*7)

$validator = new azi\Validator();
$validator->validate(array_merge($_POST, $_FILES), [
    'profile_picture' => 'file:image'
]);

Available Rules

  • required
  • email
  • password Accepts password strength like password:strong|medium|normal (default noraml)
  • number
  • file Accepts file type currently supported formats: image,video,doc
  • min
  • max
  • length
  • array
  • boolean
  • ip
  • same
  • alpha
  • alnum

Contributions

This repository is maintained by @azeemhassni, (*8)

If you can contribute I'd love to merge your PR and your name will be mentioned in the release notes and contributors list., (*9)

The Versions

17/11 2017

dev-master

9999999-dev

Server side data/form validation library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Azeem Hassni

09/09 2017

1.0.2

1.0.2.0

Server side data/form validation library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Azeem Hassni

23/08 2017

1.0.1

1.0.1.0

Server side data/form validation library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Azeem Hassni

08/04 2017

1.0

1.0.0.0

Server side data/form validation library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Azeem Hassni

01/04 2017

0.1-beta

0.1.0.0-beta

Server side data/form validation library

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Azeem Hassni