tanakahisateru / pinoco

Web site development framework using PHP and (mainly) PHPTAL
http://tanakahisateru.github.io/pinoco/
Other
43 stars 10 forks source link

Validator as converter #29

Closed tanakahisateru closed 13 years ago

tanakahisateru commented 13 years ago

Validator should work as converter. Trim, type cast, encoding convert or such as...

Proposed semantics:

$v = new Pinoco_Varidator($input);
$v->check('username')->filter('trim')->is('not-empty')->is('alpha-numeric')->filter('unicode');
$validInput = $v->collect();
tanakahisateru commented 13 years ago

Fixed.

$validInput = $v->values; //like as errors