Download the PHP package lupuscoding/din-validator without Composer
On this page you can find all versions of the php package lupuscoding/din-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lupuscoding/din-validator
More information about lupuscoding/din-validator
Files in lupuscoding/din-validator
Package din-validator
Short Description Package to validate strings for DIN specifications
License MIT
Homepage http://lupuscoding.de
Informations about the package din-validator
din-validator - DIN Validator
Library to validate if strings meet specific DIN Specifications.
Currently, included specs:
- DIN SPEC 91379
Contents
- Requirements
- Install
- Usage
- Development
- Testing
Requirements #
- PHP >= 7.4
Install #
Usage #
To validate a string for a certain DIN specification, it is recommended to use the static ValidatorFactory methods.
For example: We want to validate an user input for DIN SPEC 91379
You are also able to use specific tests, if you need more detailed information. The majority validator methods of this library should work on basis of a single character. Because of this, you should be able to test single characters if they are part of the specification. For this, initialize the class, related to the required specification (src/Specs/) and search for a method to fit your needs.
Development #
- Every contribution should respect PSR-2 and PSR-12.
- Methods must provide argument types and return types.
- Class properties must be typed.
- doc blocks must only contain descriptive information.
- doc blocks may additionally contain a type declaration for arguments or return values, if the type declaration is not precise.
For example: may not be precise if the method returns an array of arrays or objects. Consider a doc block entry like or for clarification.
Testing #
First install phpunit by executing
Then start phpunit by executing
All versions of din-validator with dependencies
ext-mbstring Version *