mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
18 lines
388 B
PHP
18 lines
388 B
PHP
<?php
|
|
|
|
namespace App\Rules;
|
|
|
|
use Illuminate\Contracts\Validation\Rule;
|
|
|
|
class PasswordAlgorithm implements Rule
|
|
{
|
|
public function passes($attribute, $value)
|
|
{
|
|
return in_array($value, array_keys(passwordAlgorithms()));
|
|
}
|
|
|
|
public function message()
|
|
{
|
|
return 'The password algorithm must be in ' . implode(', ', array_keys(passwordAlgorithms()));
|
|
}
|
|
}
|