mirror of
https://github.com/Respect/Validation.git
synced 2026-03-14 22:35:45 +01:00
Replace isValid() calls with assert()
There's more value on showing how `assert()` displays the validation messages than simply showing if `isValid()` returns `true` or `false`. However, that increases the chances of having outdated documentation, so I created a doc linter that updates the Markdown files with the correct message.
This commit is contained in:
parent
98150c7065
commit
d2198dfd01
165 changed files with 1748 additions and 623 deletions
|
|
@ -5,7 +5,11 @@
|
|||
Validates if a file is an executable.
|
||||
|
||||
```php
|
||||
v::executable()->isValid('script.sh'); // true
|
||||
v::executable()->assert('/path/to/file');
|
||||
// → "/path/to/file" must be an executable file
|
||||
|
||||
v::executable()->assert('/path/to/executable');
|
||||
// Validation passes successfully
|
||||
```
|
||||
|
||||
## Templates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue