Download the PHP package kreyu/nip-validator-bundle without Composer

On this page you can find all versions of the php package kreyu/nip-validator-bundle. 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 nip-validator-bundle

NIP/TIN Validator Bundle

Latest Stable Version Build Status

Validate the tax identification numbers with configurable validation constraint.

Requirements

For PHP 7.0 & Symfony 3.4, look at v1.x version.

Installation

To download the bundle, require it using the Composer:

Usage

Like with all Symfony validation constraints, you can apply it by using annotations:

or by using attributes:

or by using YAML:

or by using XML:

or by using PHP:

Pattern validation

By default, the only accepted format is a string of characters without the prefix nor dashes.

Usage of dashes

If you wish to allow or require the usage of the dashes, use the allowDashes and requireDashes options:

Both options are set to false by default.
Setting the requireDashes option to true ignores the value of the allowDashes, as the number without dashes is no longer valid.
The allowed formats with dashes are following:

Usage of prefix

If you wish to allow or require the usage of the prefix, use the allowPrefix and requirePrefix options.
Additionally, it is possible to modify the length of the prefix, using the prefixLength option.

Both allowPrefix and requirePrefix options are set to false by default, and prefixLength defaults to 2.
Prefixes are not followed with the space:

Customization of the pattern violation message

It is possible to customize the pattern violation message using the patternMessage option:

You can use the following parameters in this message:

Parameter Description
{{ value }} The current (invalid value)
{{ pattern }} The regular expression pattern used in the validation

Usage of a custom regular expression

If the default functionality does not meet your needs, consider using the pattern option:

By default this option is equals null, and setting it to any other value ignores the allowDashes, requireDashes, allowPrefix and requirePrefix options.

Checksum validation

By default, the checksum is being validated. If you wish to disable this feature, set the checksum option to false:

Customization of the checksum violation message

It is possible to customize the checksum violation message using the checksumMessage option:

You can use the following parameters in this message:

Parameter Description
{{ value }} The current (invalid value)

Usage of a callable normalizer

It is possible to define the PHP callable to apply on the value before the validation, using the normalizer option:

License

The MIT License (MIT). Please see license file for more information.


All versions of nip-validator-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/validator Version >=6.1
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 kreyu/nip-validator-bundle contains the following files

Loading the files please wait ....