Bluz\Validator\ValidatorChain
Chain of Validators
Chain can consists one or more validation rules
- Author: Anton Shevchuk
Synopsis
- // members
- protected $description;
- protected array $rules = ;
- protected $error;
- // methods
- public ValidatorChain __call()
- public ValidatorChain addRule()
- public bool isRequired()
- public ValidatorChain callback()
- public ValidatorChain regexp()
- public bool validate()
- public void assert()
- public bool __invoke()
- public string __toString()
- public null|string getError()
- protected ValidatorChain setError()
- public array getDescription()
- public ValidatorChain setDescription()
Hierarchy
Implements
Members
protected
- $description — string
- $error — string
- $rules — array
Methods
protected
- setError() — Set error message for replace text from rule
public
- __call() — Magic call for create new rule
- __invoke()
- __toString()
- addRule() — Add Rule to ValidatorChain
- assert() — Assert
- callback() — Add Callback Rule to ValidatorChain
- getDescription() — Get validation description
- getError() — Get error message
- isRequired() — Get required flag
- regexp() — Add Regexp Rule to ValidatorChain
- setDescription() — Set validation description
- validate() — Validate chain of rules
History
-
2017-10-19T07:08:53+00:00 (commit #c97617f)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Fixed `Required` rule for `Validator`
-
2017-09-15T14:06:15+00:00 (commit #f7c3dc5)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Removed `ValidatorFormException`
-
2017-09-07T09:33:42+00:00 (commit #c35342a)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Small changes in Validator classes
-
2017-09-06T08:56:24+00:00 (commit #f38d1ec)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `ValidatorInterface` Added `ValidatorFormException` Added method `Validator::addRuleNamespace()`
-
2017-08-02T09:00:53+00:00 (commit #9f6654b)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added test for regexp shorthand function
-
2017-07-28T16:08:14+00:00 (commit #d6dcb78)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added magic `__invoke` to ValidatorChain
-
2017-07-28T08:10:34+00:00 (commit #f1280d3)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Small codestyle fix
-
2017-07-27T08:39:36+00:00 (commit #26d6050)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Added `ValidatorChain::callback` method for wrap default behaviour
-
2017-07-26T12:46:33+00:00 (commit #b81814d)
Author: Anton Shevchuk (AntonShevchuk@gmail.com) / Commiter: Anton Shevchuk (AntonShevchuk@gmail.com)
Validator refactoring