mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
required-conditionals; fixing missing semi colon in readme
This commit is contained in:
parent
17c2f05168
commit
c8c428b3cd
@ -221,7 +221,7 @@ $v->validate();
|
|||||||
The `requiredWith` rule checks that the field is required, not null, and not the empty string, if any other fields are present, not null, and not the empty string.
|
The `requiredWith` rule checks that the field is required, not null, and not the empty string, if any other fields are present, not null, and not the empty string.
|
||||||
```php
|
```php
|
||||||
// password field will be required when the username field is provided and not empty
|
// password field will be required when the username field is provided and not empty
|
||||||
$v->rule('requiredWith', 'password', 'username')
|
$v->rule('requiredWith', 'password', 'username');
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternate syntax.
|
Alternate syntax.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user