Skip to content

Set rule option skipOnError to false by default#170

Merged
samdark merged 1 commit into
yiisoft:masterfrom
dehbka:issue-169
Feb 15, 2022
Merged

Set rule option skipOnError to false by default#170
samdark merged 1 commit into
yiisoft:masterfrom
dehbka:issue-169

Conversation

@dehbka

@dehbka dehbka commented Feb 14, 2022

Copy link
Copy Markdown
Contributor
Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues 169

@samdark samdark merged commit 045fd33 into yiisoft:master Feb 15, 2022
@samdark

samdark commented Feb 15, 2022

Copy link
Copy Markdown
Member

Thanks!

@arogachev

arogachev commented Feb 17, 2022

Copy link
Copy Markdown
Contributor

The usages and docs also need to be adjusted. Maybe in future PRs now. For example -

validator/README.md

Lines 127 to 134 in 045fd33

#### Skipping validation on error
By default, if an error occurred during validation of an attribute, further rules for this attribute are skipped.
To change this behavior use `skipOnError(false)` when configuring rules:
```php
Number::rule()->integer()->max(100)->skipOnError(false)
```
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants