mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 18:08:06 +00:00
19 lines
423 B
PHP
19 lines
423 B
PHP
<?php
|
|
|
|
namespace App\Rules;
|
|
|
|
use Illuminate\Contracts\Validation\Rule;
|
|
use Respect\Validation\Validator;
|
|
|
|
class IsNotPhoneNumber implements Rule
|
|
{
|
|
public function passes($attribute, $value): bool
|
|
{
|
|
return (Validator::not(Validator::phone())->not(Validator::startsWith('+'))->validate($value));
|
|
}
|
|
|
|
public function message()
|
|
{
|
|
return 'The :attribute should not be a phone number';
|
|
}
|
|
}
|