Skip to content

Commit 6a27295

Browse files
committed
Add doc for DivisibleBy
1 parent 9187d5b commit 6a27295

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function rules()
4949
- [`Btc Address`](#btcaddress)
5050
- [`Credit Card`](#creditcard)
5151
- [`Data URI`](#datauri)
52+
- [`Divisible By`](#divisibleby)
5253
- [`Float Number`](#floatnumber)
5354
- [`Image URL`](#imageurl)
5455
- [`Phone`](#phone)
@@ -160,6 +161,21 @@ public function rules()
160161
}
161162
```
162163

164+
### `DivisibleBy`
165+
166+
The field under validation must be divisible by the given number.
167+
168+
```php
169+
use Arifszn\AdvancedValidation\Rules\DivisibleBy;
170+
171+
public function rules()
172+
{
173+
return [
174+
'foo' => [new DivisibleBy(2)],
175+
];
176+
}
177+
```
178+
163179
### `FloatNumber`
164180

165181
The field under validation must be a float number.

src/Rules/DivisibleBy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Illuminate\Support\Facades\Validator;
77

88
/**
9-
* The field under validation must be divisible by another.
9+
* The field under validation must be divisible by the given number.
1010
*
1111
* @package Arifszn\AdvancedValidation\Rules
1212
*/

0 commit comments

Comments
 (0)