Download the PHP package lukman-ss/validation without Composer

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

Lukman Validation

A lightweight standalone PHP validation library with zero external runtime dependencies.

Requirements

Installation

Install the package via Composer:

Basic Usage

Run validation using either standard boolean checks or the exception flow.

Exception Flow

Use validate() (or validateOrFail()) to directly get validated data or throw a ValidationException when validation fails.

To validate without throwing exceptions, use the safe() helper:

Rules Formatting

String Rules

Separate multiple rules with a pipe | character. Rule parameters are separated by commas ,.

Array Rules

Rules can also be provided as an array, enabling the use of rule objects and closures.

Nested Data

Validate deep nested arrays using dot notation:

Wildcard Validation

Validate all elements within an array using the wildcard * operator. Error keys will automatically map to the specific indices:

Custom Messages

Define custom messages globally per rule or specifically for a field:

Placeholders

Custom messages support the following placeholder values:

Custom Attributes

Translate technical field paths into user-friendly names:

Extensibility & Custom Rules

Custom Rule Objects (RuleInterface)

Create a class implementing RuleInterface:

Use it in your rules array:

Closure Rules

Define quick rules inline using Closures:

Global Factory Extensions

Register custom rules globally to use them with string rule definitions:

Post-Validation Hooks (after)

Attach callbacks that execute after standard rule evaluations. This is useful for complex, multi-field, or conditional validation checks:

Runtime Mutation

Change the dataset or rule configurations dynamically using setters. Setting new data or rules automatically clears existing errors and resets the validation state:

License

This package is open-source software licensed under the MIT License.


All versions of validation with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
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 lukman-ss/validation contains the following files

Loading the files please wait ...