Skip to content

Commit 704fc4b

Browse files
committed
Create documentation for landline validator
1 parent db17be5 commit 704fc4b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/1.x/valid-landline-number.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## ValidLandlineNumber
2+
3+
If you want to validate the landline number, you can use the `ValidLandlineNumber` rule:
4+
5+
```php
6+
use Milwad\LaravelValidate\Rules\ValidLandlineNumber;
7+
8+
return [
9+
'landline-number' => ['required', new ValidLandlineNumber()], // landline-number => 09120000000
10+
];
11+
```
12+
13+
Also `ValidLandlineNumber` have the ability to validate landline number with specific country code:
14+
15+
```php
16+
use Milwad\LaravelValidate\Rules\ValidLandlineNumber;
17+
use Milwad\LaravelValidate\Utils\Country;
18+
19+
return [
20+
'landline-number' => ['required', new ValidLandlineNumber(Country::GERMANY)], // landline-number => 09120000000
21+
];
22+
```
23+
24+
> **Note**
25+
> If you want to know which country's codes are supported by the `ValidLandlineNumber` Rule, you can search your country
26+
> on this [Countries Landline Number](#support-countries-landline-number) list.
27+
28+
<a name="support-countries-landline-number"></a>
29+
## Support Countries Landline Number
30+
31+
- ✅ IRAN
32+
- ✅ GERMANY
33+

0 commit comments

Comments
 (0)