Skip to content

Instantly share code, notes, and snippets.

@ashour
Last active February 13, 2020 10:55
Show Gist options
  • Save ashour/9c69af45335439c108f3c1983d79dd12 to your computer and use it in GitHub Desktop.
Save ashour/9c69af45335439c108f3c1983d79dd12 to your computer and use it in GitHub Desktop.
<?php
require_once dirname(__FILE__) . '/../i18n/I18n.php';
class Validator
{
public static function make($rules, $fields)
{
return new static($rules, $fields);
}
private $rules;
private $fields;
private $errors = [];
public function __construct($rules, $fields)
{
$this->rules = $rules;
$this->fields = $fields;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment