Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Remote Rule

Laravel Remote Rule Laravel Package

maize-tech/laravel-remote-rule

Laravel Remote Rule lets you delegate field validation to a remote HTTP endpoint, turning its JSON response into standard validation errors. Share validation logic across services and apps without duplicating rules in every codebase.

View on GitHub
Deep Wiki
Context7

Easily validate data attributes through a remote request

Frequently asked questions about Laravel Remote Rule
What is maize-tech/laravel-remote-rule used for?
It is a Laravel package for validating request or data attributes by delegating the check to a remote HTTP endpoint. The endpoint's JSON response is translated into standard Laravel validation errors, so validation logic can live in one external service instead of being duplicated across applications. It fits use cases such as tax ID, address, entitlement, or KYC-style checks where the rule owner lives outside the Laravel app.
Does laravel-remote-rule support Laravel 11?
Release 2.2.0 adds Laravel 11.x support according to the release assessment. The release is described as a compatibility update without called-out breaking changes, new features, or deprecations. Before upgrading, confirm the exact PHP and Laravel constraints in the package composer.json and run your application test suite.
How do I install maize-tech/laravel-remote-rule?
Install it as a Composer dependency in your Laravel application, then follow the package README for any service provider or configuration publishing steps. The assessment indicates Composer-based installation and Laravel-native validation usage, with no announced migration steps. Pin the version you validate in staging and avoid scattering direct usage across controllers.
How does remote validation work in Laravel Remote Rule?
The package provides a Laravel validation rule that sends the field value to a configured remote endpoint and interprets the JSON response as pass or fail. Failures become normal Laravel validation errors, so they can be displayed through your existing error handling and localization. Because the check happens over HTTP, latency and failure behavior depend on the remote service and your timeout and fallback configuration.
Can I mock or fake the remote validator in tests?
You should plan to mock the remote endpoint so CI does not depend on an external service. The assessment flags testability as a key adoption question, so verify whether the package offers a fake, HTTP client injection, or configurable transport. If it does not, wrap it in an internal custom rule or adapter and fake that boundary in your tests.
What happens if the remote validation service is down or times out?
The documented timeout, retry, and failure-mode behavior should be confirmed before production use. The package delegates validation to an external HTTP call, so you need an explicit decision between fail-open and fail-closed behavior for outages. Wrap the rule behind an internal adapter so timeouts, fallbacks, and logging are enforced in one place.
Is laravel-remote-rule suitable for high-traffic production validation?
It is best suited to bounded validation needs where request volume is moderate, not high-QPS hot paths. Each validation can introduce network latency and runtime coupling to an external service, so caching, batching, or async support should be verified before scaling. For security-critical decisions or flows that must not depend on an outage-prone service, use it only with a well-defined fallback.
Can the remote validation endpoint URL be user-controlled?
The endpoint URL should be developer-controlled and configured through trusted application configuration, not supplied by untrusted users. If user-controlled URLs are allowed, you introduce SSRF risk and potential exposure of internal services or PII. Review the package configuration and keep credentials and endpoint allowlists outside user input.
Does laravel-remote-rule still support Laravel 10 and which PHP versions?
The 2.2.0 release is identified as adding Laravel 11.x support, but the assessment specifically recommends verifying Laravel 10 backward compatibility and PHP constraints in composer.json. Do not assume the full version matrix from the release note alone. Check the package metadata and run a staging spike on your exact Laravel and PHP versions.
Should I use laravel-remote-rule or a custom Laravel validation rule?
Laravel Remote Rule can reduce custom HTTP-validation code when validation logic is owned outside the application. A custom rule built on Laravel's HTTP client may be preferable if you need bespoke timeout, retry, caching, or fallback behavior. In either case, wrap the boundary in an internal adapter and feature flag a pilot before broad use.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package