Skip to content

mohamedamrmt/validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

validation lib

validation is a small php validation lib for mysql databases.

installation

install once with composer:

composer require itsharks/validation

then add this to your project:

require_once "vendor/autoload.php";

$validation = new \Itsharks\Validation\validation();

usage

/* required */
$validation->input("inputname")->required();
/* email */
$validation->input("inputname")->email();
/* min */
$validation->input("inputname")->min(number);
/* max */
$validation->input("inputname")->max(number);

// show errors 
$validation->showErorr();

// is error 
$validation->is_error();

// case 
$validation->input("inputname")->required()->min(2)->max(10);
$validation->showErorr();
if($validation->is_error()){
    // statement   
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages