mako-framework/framework — pull request #98 by aldoanizio (2014-05-05 18:04:32+00:00)
Title: Added 'where' clauses to 'exists' validator

Added possibility to parse 'where' clauses to 'exists' validator.

Eg:

$validator = $this->validator->create($this->request->post(),
[
"user_id" => "exists:users,id,activated,=,1,banned,=,0",
"customer_id" => "exists:customers,id,type,!=,reseller,activated,=,1",
"admin_id" => "exists:administrators,id,date_added,>=,1999-12-31,date_added,<=,2000-12-31"
]);

Parse unlimited parameters following the the sequence: 'column','operator','value'