flexisip-account-manager/flexiapi/app/Rules/PasswordAlgorithm.php
2023-12-19 09:30:21 +00:00

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()));
}
}