isValidEmail (function)
Last updated: Mon, Apr 17, 2023 11:10 am
Return to Knowledgebase
Purpose
Used to check whether an email address is valid or not.
Location
users/helpers/us_helpers.php
Parameters
# |
Parameter |
Data Type |
Required |
Description |
1 |
$email |
string |
Yes |
the email address to be validated |
Returns
Data Type |
Description of Returned Data |
bool |
true if the email is valid, false if it is not valid |
Further Documentation:
Example Usage:
$email = "example@domain.com";
if(isValidEmail($email)) {
echo "Valid email address.";
} else {
echo "Invalid email address.";
}