-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New: Add Carbon.String.isValidEmail helper
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 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
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 |
---|---|---|
|
@@ -453,6 +453,20 @@ Examples: | |
|
||
**Return** The phone number, optimized for links | ||
|
||
### `Carbon.String.isValidEmail(emailAddress)` | ||
|
||
Checks if the string is a valid email address | ||
|
||
Examples: | ||
|
||
| Expression | Result | | ||
| ------------------------------------------ | ------- | | ||
| `Carbon.String.isValidEmail('')` | `false` | | ||
| `Carbon.String.phone('Some text')` | `false` | | ||
| `Carbon.String.phone('[email protected]')` | `true` | | ||
|
||
- `emailAddress` (string) The string to check | ||
|
||
## Number Helper | ||
|
||
### `Carbon.Number.format(number, decimals, dec_point, thousands_sep)` | ||
|