Download the PHP package digicomp/settingvalidator without Composer

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

DigiComp.SettingValidator

This package allows configuring validators with a new configuration type.

Introduction

This package provides the SettingsValidator which uses the configuration type Validation to resolve the validators that should be applied to the value. It distinguishes between validators that are applied to the value itself and its properties.

Resolving the validation configuration

The SettingsValidator has an option name. If it is set, the name is used to resolve the validation configuration, otherwise the type of the value is used, which is mainly useful for objects where the FQCN is used.

Resolving by option name

To resolve the validation configuration by name just use the option name.

The SettingsValidator will search for an entry inside the Validation.yaml with that name.

Resolving by type

To resolve the validation configuration by type just do not set the option name.

The SettingsValidator will search for an entry inside the Validation.yaml with the FQCN of MyObject.

The validation configuration

Difference between self and properties

self contains a map of validators that are applied to the value itself. properties contains a map with property names of the value you would like to validate and each entry contains a map of validators that are applied to that property.

Configuring a validator

To configure a validator you use the type of the validator as key and the options as entries of that key. If the validator has no options or all the default values are used, set an empty map as options.

Disable a validator

To disable a validator you need to set the options to null.

Using the SettingsValidator

The SettingsValidator can be used to reduce the number of @Flow\Validate annotations and gives you the possibility of overwriting existing validation configurations in other packages.

Using on properties

Old PHP code:

New PHP code:

New validation configuration:

Using on actions

Old PHP code:

New PHP code:

New validation configuration:

Using inside validator configurations

You can use the SettingsValidator inside the validator configuration to easily construct flexible structures.

Providing an empty validator

It can be useful to provide an empty validator in code that is used by many projects. By doing so you can make sure that a different validation is possible in any project.


All versions of settingvalidator with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ^6.3.5 | ^7.0 | ^8.0
php Version >=7.4
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 digicomp/settingvalidator contains the following files

Loading the files please wait ....