Download the PHP package petroslabs/fr-validator-symfony without Composer

On this page you can find all versions of the php package petroslabs/fr-validator-symfony. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fr-validator-symfony

fr-validator-symfony

CI Mutation testing badge Packagist

Symfony Validator constraints for petroslabs/fr-validator: NIR, RIB, SIREN, SIRET, IBAN, BIC, VAT number, NAF/APE and phone number, as #[Constraint] attributes.

Why a separate package

The core library has zero framework dependency on purpose — most consumers just want to check a string. This package exists only to translate that into Symfony's Validator component, with its own release cycle and test matrix across supported Symfony versions. If you don't use Symfony, you don't need this package at all.

Installation

Usage

Each constraint short-circuits on null/'' (combine with NotBlank if emptiness itself should be rejected), and on failure exposes the core library's typed failure reason — not just a generic "invalid" message — as both the {{ reason }} message parameter and the violation code:

Constraints

Constraint Wraps
Nir NIR (social security number)
Rib RIB key
Siren SIREN
Siret SIRET
Iban French IBAN
Bic BIC/SWIFT (general format)
Vat French VAT number
Naf NAF/APE activity code (accepts additionalCodes, see the core package)
Phone French phone number

Scope and known limitations for each one are documented in the core package's README — this bridge doesn't change or repeat them.

Known v1 simplification

Messages ship with an English default and no pre-built translations — override them like any other Symfony constraint (per-constraint message option, or your app's own translations/validators.*.yaml since no custom translation domain is set). A French-first package not shipping French translations by default is a real gap; it's just not solved yet.

Development

See CONTRIBUTING.md.

Security

See SECURITY.md to report a vulnerability.

License

MIT — see LICENSE.


All versions of fr-validator-symfony with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
petroslabs/fr-validator Version ^0.1
symfony/validator Version ^6.4 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package petroslabs/fr-validator-symfony contains the following files

Loading the files please wait ...