Download the PHP package laurynasgadl/php-validator without Composer

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

PHP-Validator

inspired by Laravel's form validation

Installation

composer require laurynasgadl/php-validator

Documentation

Rules

Custom rules

You can also register the rule to be able to use it as a string:

Existing rules

array : the value needs to be an array

between:{from_size},{to_size} : the value needs to be between the given range

float : the value needs to be a float

integer : the value needs to be an integer

max:{max_size} : the value needs to be less or equal to the given amount

min:{min_size} : the value needs to be greater or equal to the given amount

required : the parameter needs to exist in the data set

required_with:{param_1}... : the parameter needs to exist in the data set if all the other parameters exist

required_without:{param_1}... : the parameter needs to exist in the data set if one of the other parameters do not exist

size : the size of the value needs to be equal to the given amount. The size of a string is its length, the size of an array is the number of elements inside it, the size of a boolean is 0 or 1.

string : the value needs to be a string

boolean : the value needs to be a boolean

numeric : the value needs to be a numeric

default:{value} : the rule will always be applied first, meaning, params can successfully pass required rules even if their value is not set or is null

alpha_dash : the value can only be made up of uppercase and lowercase letters, numbers and - or _ symbols

alpha_numeric : the value can only be made up of uppercase and lowercase letters and numbers

regex:{pattern} : the value needs to match the given pattern

email : the value needs to be an email

url : the value needs to start with http:// or https:// and only contain URL-valid symbols

ip : the value needs to be an IP address

Custom messages

You can set custom validation messages either via the Validator constructor or the validate method:


All versions of php-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laurynasgadl/travers Version ^2.0
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 laurynasgadl/php-validator contains the following files

Loading the files please wait ....