Add SMS bulk delay configuration and validate coupon phone function
This commit is contained in:
@@ -76,6 +76,16 @@ if (! function_exists('unmask_phone')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('is_valid_coupon_phone')) {
|
||||
/**
|
||||
* Whether an 8-digit stored coupon phone can receive SMS.
|
||||
*/
|
||||
function is_valid_coupon_phone(string $phone): bool
|
||||
{
|
||||
return (bool) preg_match('/^6\d{7}$/', $phone);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('format_phone')) {
|
||||
/**
|
||||
* Format an 8-digit TM mobile number for display (+993 6X XX XX XX).
|
||||
|
||||
Reference in New Issue
Block a user