07-14-2017, 10:42 PM
Here's an example:
Code:
$rules = [
Code:
"name" => [
Code:
"display" => "Username",
Code:
"required" => true,
Code:
"unique_update" => "users,".$userId,
Code:
"min" => 1,
Code:
"max" => 25
Code:
]
Code:
];
Code:
$validation = new Validate();
Code:
$validation->check($_POST, $rules);
Code:
if ($validation->passed()) {};