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

Axiom Laravel Package

caneara/axiom

Axiom is a Laravel package for adding finite state machines to Eloquent models. Define states, transitions, and guards in one place, then move records through workflows safely with expressive, testable code that keeps order, subscription, and approval status changes clean.

View on GitHub
Deep Wiki
Context7

A package that provides a library of reusable Laravel validation rules.

Frequently asked questions about Axiom
How do I install caneara/axiom in a Laravel application?
Install it with Composer by running composer require caneara/axiom. The package fits natively into Laravel's validation subsystem, so no migrations, published assets, or config publishing should be required. If the service provider is not auto-discovered, register it manually in your providers configuration. After that, the rules are available to your form requests and validator calls.
Which Laravel and PHP versions does Axiom support?
Check the require block in the package's composer.json rather than inferring support from a patch-level version bump. Confirm explicitly that your PHP 8.x version and Laravel LTS release are listed, and check whether rules implement the modern ValidationRule contract used from Laravel 9 onward or the legacy string signature. Legacy signatures can break under later framework versions, so verify before adding it to a long-lived application.
How do I use the Vietnamese citizen ID rule in a FormRequest?
Add the rule to your validation array alongside the usual constraints, for example 'id_number' => ['required','string','vn_citizen_id','unique:users,id_number']. It composes cleanly with bail and the rest of your rule chain, and works in FormRequest rules, Validator::make, and inline $request->validate() calls. Confirm the exact rule key from the package documentation, since a competing identity-rule library could cause a key collision.
Does the rule accept both 9-digit CMND and 12-digit CCCD numbers?
The rule targets Vietnamese citizen identity numbers, which span the legacy 9-digit CMND scheme and the 12-digit CCCD scheme introduced in 2016. Ask the maintainer whether both formats are accepted by default or whether one requires an explicit opt-in or migration flag. Test fixtures should cover leading zeros, pre-2016 identifiers, and malformed date-of-birth segments before you roll it out.
Does Axiom's Vietnamese ID rule check province codes and checksums, or is it regex only?
Vietnamese ID validation is not a pure checksum: it depends on province-code tables that are administratively revised, plus the 6-digit province code, gender and century digit, and YYMMDD date-of-birth encoding. Determine whether the rule performs structural validation only or validates province codes against a maintained dataset, where that dataset lives, and who updates it. If it is regex-only, treat it as a UX nicety rather than a verified KYC or AML control.
Is caneara/axiom a validation rules library or a state machine package?
Axiom is a library of reusable Laravel validation rules, and its recent release added a Vietnamese citizen ID rule. Some third-party descriptions mistakenly describe it as a finite state machine package for Eloquent models, so rely on the repository README and release notes rather than secondary blurbs. The package is stateless and synchronous, adding no queues, caches, or storage layers to your architecture.
Can I use Axiom rules with Validator::make and inline request validation?
Yes. Because the rules plug into Laravel's native validation subsystem, they work anywhere a rule string or ValidationRule object is accepted, including Validator::make, FormRequest classes, and $request->validate(). No config publishing, migrations, or queue workers are involved, so integration is typically a Composer update plus wiring the rule into the relevant requests. It is an additive, opt-in capability that does not alter your application architecture.
Should I retroactively validate existing ID numbers after installing Axiom?
Avoid backfilling or re-validating existing records as part of this upgrade. Validation is write-path only, so stored values are unaffected unless you deliberately add a backfill or admin-side re-validation job. Applying the rule retroactively against an existing Vietnamese user base can cause previously accepted values to fail, which creates support load without improving data quality.
How do I customize the error messages Axiom returns, and can they be translated?
Check whether the rule returns a translatable message key or a hardcoded English string, because a hardcoded message has to be overridden in your lang files or via the custom messages array passed to the validator. If the package ships translation files, you can publish or override them per locale. Confirm the behavior in a sandbox install before promising localized validation feedback to users.
Is caneara/axiom actively maintained, and are there alternatives?
Review the maintainer's release cadence and issue-response history, particularly for other locale-specific rules, since an unmaintained province table will produce false rejects on legitimate users. Also note that a new rule shipped as a patch bump suggests the project may not follow strict semver, which raises the cost of automated dependency-bump policies. If either point is a problem, compare against dedicated identity-validation libraries, but first confirm that adding one will not collide with Axiom's rule keys.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo