IlchCMS/Ilch-2.0 — pull request #74 by dastiii (2014-06-05 16:36:42+00:00)
Title: Validations

Hab das dann mal etwas angepasst:

```php
$data = ['name' => 'a', 'datetime' => '28.05.2014 13:31:21', 'password' => '12345', 'password_confirmation' => '123456'];

$validation = new \Ilch\Validator;
$validation->addRules([
'name' => [
'required',
'maxLength' => 30,
'minLength' => 5,
'breakChain',
'filters' => [
'before' => ['stringToLower'],
'after' => [
'trim' => [\Ilch\Validator::SELF]
]
]
],
'datetime' => [
'required',
'datetime' => [
'format' => 'd.m.Y H:i:s',
],
],
'password' => [
'required',
'minLength' => '6',
'same' => [
'as' => 'password_confirmation'
],
'filters' => [
'after' => ['crypt' => [\Ilch\Validator::SELF]]
],
'breakChain'
],
]);
```