flexisip-account-manager/flexiapi/app/Rules/IsNotPhoneNumber.php
Timothée Jaussoin eeeb6baf74 Fix FLEXIAPI-366 Send the voicemails by email
Add a Voicemail UI to listen and delete voicemails in the Admin Account view
2025-12-11 17:20:56 +01:00

19 lines
397 B
PHP

<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
use Propaganistas\LaravelPhone\PhoneNumber;
class IsNotPhoneNumber implements Rule
{
public function passes($attribute, $value): bool
{
return (new PhoneNumber($value))->getCountry() == null;
}
public function message()
{
return __('The :attribute should not be a phone number');
}
}