-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wazabii
committed
Nov 27, 2023
1 parent
423c8b2
commit 0dbc0a3
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ Inp::value("Lorem ipsum dolor")->length(1, 160); | |
Inp::value("[email protected]")->email(); | ||
``` | ||
### Check if is valid phone | ||
Will allow only numbers and some characters like (”-”, ”+” and ” ”). | ||
Will allow only numbers and some characters like ("-", "+" and " "). | ||
```php | ||
Inp::value("+46709676040")->phone(); | ||
``` | ||
|
@@ -55,15 +55,17 @@ Inp::value("#000000")->hex(); | |
``` | ||
### Check date and date format | ||
```php | ||
Inp::value("2022/02/13 14:15")->date(”Y/m/d H:i”); | ||
Inp::value("2022/02/13 14:15")->date("Y/m/d H:i"); | ||
// The date argument is the expected date format (will also take time) | ||
``` | ||
### Check date, date format and is between a range | ||
```php | ||
Inp::value("2022/02/13 - 2022/02/26")->date(”Y/m/d”); | ||
Inp::value("2022/02/13 - 2022/02/26")->dateRange("Y/m/d"); | ||
// The dateRange argument is the expected date format (will also take time) | ||
``` | ||
### Check if persons is at least 18 years old or older. | ||
```php | ||
Inp::value("1988-05-22")->age(”18”); | ||
Inp::value("1988-05-22")->age("18"); | ||
``` | ||
### Check if is a valid domain name | ||
```php | ||
|