<?php

namespace App\Rules;

use App\Support\Integration\WalletApiUrlSanitizer;
use Illuminate\Contracts\Validation\Rule;

final class WalletApiUrlRule implements Rule
{
    public function passes($attribute, $value): bool
    {
        return WalletApiUrlSanitizer::normalizeAndValidate($value) !== null;
    }

    public function message(): string
    {
        return (string) __('validation.custom.wallet_api_url.wallet_api_url');
    }
}

