Download the PHP package deskola/simple-validator without Composer

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

Simple Validator

What is it?

A PHP library for sanitizing and validating user inputs. This library is based on https://www.phptutorial.net/ tutorial on how to make a custom input validator form scratch.

1) Installation 2) Supported input types 3) Usage

Installation

PHP versions 7.1 up to PHP 8.1 are currently supported.

The PECL mbstring extension is required.

It is recommended to use composer to install the library.

You can also use any other PSR-4 compliant autoloader.

If you do not use composer, ensure that you also load any dependencies that this project has, such as giggsey/locale.

Supported input types

Below is the list of data type which will be sanitized against. Any data type not in the list will be result into an error

1) string 2) int 3) email 4) float 5) url

Supported Rules

Below are the rule that can be passed against an input

Rule Rule name Parameter Meaning
required required No The field is set and not empty
alphanumeric alphanumeric No The field only contains letters and numbers
email email No The field is a valid email address
secure secure No The field must have between 8 and 64 characters and contain at least one number, one upper case letter, one lower case letter, and one special character. This rule is for the password field. example (!@#$%^&*+_)
min: 3 min An integer specifies the minimum length of the field The length of the field must be greater than or equal to min length, e.g., 3
max: 255 max An integer specifies the maximum length of the field The length of the field must be less than or equal to min length, e.g., 255
same: another_field same The name of another field The field value must be the same as the value of the another_field
between: min, max between min and max are integers that specify the minimum and maximum length of the field The length of the field must be between min and max.
url url No The field must have a valid url starting with (http/https://)
iso:KE iso A string value of country ISO Name e.g. KE (for Kenya) This library also utilises giggsey library to validate phone number based on a country ISO Name
options:1,2 options comma separated list of items being validated against

Usage

Success Output

Error Output


All versions of simple-validator with dependencies

PHP Build Version
Package Version
Requires giggsey/libphonenumber-for-php Version ^8.12
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 deskola/simple-validator contains the following files

Loading the files please wait ....