yiisoft / yii-debug-viewer

Debugger frontend
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

Collect validator errors #27

Closed xepozz closed 1 year ago

xepozz commented 2 years ago

Collect each validation rules entries and theirs result.

Example

class Model
{
  #[String(min: 5, max: 10, stopOnErrorBehaviour: true)]
  #[Email()]
  private $id;
}

In the example you can see the Model with 1 property that has 2 rules. If the first one didn't done well the second won't be fired.

So I want to see what are rules were triggered and a list of errors if the model had. Like the following:

Validation:
- Model (success/list of errors).
  - id
    - String (success/list of errors) [X] <-- triggered or not flag
    - Email (success/list of errors) [ ] <-- triggered or not flag

Also would be great to see Rules setting, like min=5, max=10, stopOnErrorBehaviour=true from the snippet above.