Download the PHP package quillstack/validator-interface without Composer

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

Validator interface

Tests Latest Version Downloads PHP Version StyleCI CodeFactor Quality Gate Coverage Maintainability Reliability Security Maintainability License

Common interface for Validator classes. Full documentation: https://quillstack.org/validator-interface

One method, and two exception interfaces. Something which validates says so by implementing this, and something which fails validation says so by implementing the other — so a caller can tell a value it does not like from a mistake in the code.

Why this exists

Validation is the one part of an application that everybody writes differently, and the one part that everything else needs to be able to ask about. A request wants to know whether what arrived is acceptable; it should not need to know how that was decided.

This is that question as an interface, in its own package, so a package can depend on something validating without depending on how.

Requirements

Installation

Usage

The exception says which kind of thing went wrong:

Catching it is then catching one thing:

Technical documentation

Interface What it means
ValidatorInterface validate(): bool — the thing validates something
ValidatorExceptionInterface something went wrong in a validator
ValidationExceptionInterface the value was wrong, which is the usual case; extends the one above

validate() answers true or throws. It does not answer false: a caller which ignores the answer would carry on with a value nobody accepted, and a thrown exception cannot be ignored by accident.

Who implements it

There is nothing to run here: a package which only names things has no behaviour to test.

Benchmark

There is nothing here to measure.

This package is an interface. It has no behaviour of its own, so there is no operation to time and no library that does the same nothing to compare it with.

What is worth comparing is an implementation, and the honest place for that table is in whichever package implements it rather than here.

Tests

The rest of Quillstack

This is one component of Quillstack, a PHP framework which is as simple to use as it is strict about what it does.

License

MIT. See LICENSE.


All versions of validator-interface with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 quillstack/validator-interface contains the following files

Loading the files please wait ...