Download the PHP package simple-as-fuck/php-validator without Composer

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

Simple as fuck / Php Validator

Validator for php variables with intuitive rule chain, put inside mixed and you in the end get requested type.

Installation

Support

If any PHP platform requirements in composer.json ends with security support, consider package version as unsupported except last version.

PHP supported versions.

Usage

This validation can be applied into any php variable and is appropriately usable for json decoded data. All rules have declared types for next rule in chain so not look for any rules list, your IDE should hint you available rules and rule chain is designed for preventing redundant rules or rule combination which do not make sense.

Validation exception type changing

You can change exception type throw from rule chain while validation failed by inject yours exception factory.

If you want throw some HTTP exception for validation http request beware of this validator is not suitable for validation user inputs.

First: validator fail in first unsuccessful rule in nested structure and throw only one exception even if there can be more validation fails.

Second: validator throw highly generated messages which can be for user unreadable and translation support is not in plan, for us developers messages should be fine.

Third: realise than we write in PHP server side application so the app should return data in some API format and view data should some weird javascript, native or mobile client app. Yes I know than even pc games are rendered in cloud but client pc has also some computing power and if client logic and html is rendered on server is only wasting of its power.

Customization

User defined rule

You can create your rule and put it in the end of rule chain and this allow you to run some yours validation.

If you are validating something what is widely standardized, consider contribute into rule chain, for more nicely writing it or share some rule with others.

User class rule

Validator rule chain always return some specific type so generic object is not in option. You are able to convert object into some class with validated structure.


All versions of php-validator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-mbstring Version *
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 simple-as-fuck/php-validator contains the following files

Loading the files please wait ....