β¨οΈValidation
Email
validate_email($email, $debug = false)use NanFunctions\Validate;
$validator = new Validate();
$valid = $validator->validate_email('[email protected]');
echo $valid ? 'Valid' : 'Invalid';Phone
validate_phone_number($email, $country_code= false)use NanFunctions\Validate;
$validator = new Validate();
// First parameter is the phone number. Second paramater is if country code is allow
$valid = $validator->validate_phone_number('+31612345678', true);
echo $valid ? 'Valid' : 'Invalid';Last updated