Download the PHP package luckystar/validation without Composer

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

Validation library

This is a lightweight PHP validation library designed to simplify the process of validating input data in web applications. It provides a set of commonly used validation rules such as required fields, maximum and minimum lengths, numeric checks, and more. With easy integration and customizable error messages, it streamlines the validation process, ensuring data integrity and user-friendly error handling.

Rules List

Rule Description Example
required This field is required required
max_length This field must be less than {max_length} characters long max_length[10]
min_length This field must be at least {min_length} characters long min_length[5]
is_numeric This field must contain only numbers is_numeric
valid_email This field must contain a valid email address valid_email
valid_url This field must contain a valid URL valid_url
valid_ip This field must contain a valid IP address valid_ip
min This field must be greater than or equal to {min} min[5]
max This field must be less than or equal to {max} max[10]
date This field must be a valid date date

Other Parameters

Parameter Type Description Example
error_messages Array Custom error messages error_messages => ['required' => 'This field is required']

Error parameters

Parameter Description Example
:field Field name 'error_messages' => [ 'required' => ':field is required', 'max_length' => ':field is too long', 'min_length' => ':field is too short' ]
:number Field Number 'error_messages' => [ 'min' => ':field must be greater than or equal to :number', 'max' => ':field must be less than or equal to :number' ]

set rules...

How to install and run the project

Step 1: Install Composer

Step 2: First, require the composer autoloader in your script

Step 3: Add Rules and Validate (example)


All versions of validation with dependencies

PHP Build Version
Package Version
No informations.
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 luckystar/validation contains the following files

Loading the files please wait ....