Bluz\Validator\Traits\Validator
Validator trait
Example of usage
<code>
use Bluz\Validator\Traits\Validator;
use Bluz\Validator\Validator as v;
class Row extends Db\Row {
use Validator;
function beforeSave()
{
$this->addValidator(
'login',
v::required()->latin()->length(3, 255)
);
}
}
</code>
- Author: Anton Shevchuk
Synopsis
- // members
- private ValidatorForm $validatorForm;
- // methods
- private ValidatorForm getValidatorForm()
- protected ValidatorChain addValidator()
- public bool validate()
- public void assert()
Members
private
- $validatorForm — Bluz\Validator\ValidatorForm
Methods
private
- getValidatorForm() — Get ValidatorBuilder
protected
- addValidator() — Add ValidatorChain
public
- assert() — Assert input data
- validate() — Validate input data
History
-
2017-07-26T12:46:33+00:00 (commit #b81814d)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Validator refactoring
-
2017-06-30T08:36:40+00:00 (commit #2259ecf)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Fixed comments style
-
2017-04-21T13:24:35+00:00 (commit #3b25a3d)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Small update for codestyle
-
2017-03-28T15:25:38+00:00 (commit #534b375)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Fixed gravatar View Helper
-
2017-02-15T16:09:44+00:00 (commit #0fc0c8b)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Updated coveralls config
-
2017-02-13T10:14:18+00:00 (commit #43dbf55)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Rollback to `getCount()` method
-
2017-01-30T13:15:49+00:00 (commit #fd5d943)
Author: Anton (AntonShevchuk@gmail.com) / Commiter: GitHub (AntonShevchuk@gmail.com)
Merge pull request #395 from AntonShevchuk/master Added `AttachmentResponse`
-
2017-01-30T12:38:53+00:00 (commit #0ab8691)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `AttachmentResponse` Added `attachment($file)` helper for `Controller`