Input validation made easy
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
validate
LICENSE.mkd
README.mkd
example.php
validate.php

README.mkd

Validate

Dependencies

  • PHP 5.4+

Usage

<?php
  
  $test = lib\validate::test([
    'name'  => 'John',
    'nick'  => 'JohnnyBoy',
    'email' => 'john.doe@gmail.com'
  ],[
    'name'  => 'required | between(2,20) | alpha, message: please specify a name',
    'nick'  => 'between(1,20) | alphanumeric',
    'email' => 'required | email, message: invalid email address'
  ]);
  
?>