Download the PHP package timefrontiers/php-validator without Composer

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

TimeFrontiers PHP Validator

Modern PHP validation library with fluent API and bulk validation support.

Installation

Features

Quick Start

Single Field Validation (Fluent API)

Bulk Validation

Validate or Throw

Validation Rules

String Rules

Rule Description Example
name Human name (letters, hyphens, apostrophes) name or name:2,35
username Alphanumeric with optional chars username:3,32
email Valid email address email
password Strong password password:8,128
phone / tel E.164 phone format phone
url Valid URL with protocol url
ip IPv4 or IPv6 address ip or ip:v4
text Plain text with length text:10,1000
html HTML content html:0,5000
slug URL-friendly slug slug:1,128
uuid UUID v4 format uuid
json Valid JSON string json
hex Hexadecimal string hex or hex:32
color Hex color code color
alpha Letters only alpha:2,50
alphanumeric Letters and numbers alphanumeric
pattern / regex Custom regex pattern:/^[A-Z]+$/

Numeric Rules

Rule Description Example
int / integer Integer with optional range int or int:1,100
float / decimal Float with optional range float:0.0,99.99
boolean / bool Boolean value boolean

Date/Time Rules

Rule Description Example
date Date with optional range date or date:Y-m-d,2020-01-01,2030-12-31
time Time (HH:MM:SS) time or time:09:00:00,17:00:00
datetime Datetime datetime

Choice Rules

Rule Description Example
in / option Value in list in:active,inactive,pending
notIn Value not in list notIn:banned,deleted

Array Rules

Rule Description Example
array Is array with count array:1,10
arrayOf Each item passes rule (fluent only)

Special Rules

Rule Description Example
creditcard Luhn algorithm check creditcard
countryCode ISO 3166-1 alpha-2 countryCode
currencyCode ISO 4217 currencyCode
fileExtension File extension check (fluent only)

Modifier Rules

Rule Description Example
required Must be present required
nullable Allow null/empty nullable
min Minimum length min:5
max Maximum length max:255
length Exact length length:10
between Length range between:5,20

Fluent API Details

Basic Chain

Nullable Fields

Custom Messages

Custom Rules

Get Value Directly

Throw on Failure

Bulk Validation Details

String Syntax

Array Syntax

Custom Messages

Dot Notation

Result Methods

Rule Details

Password Rule

Username Rule

Date Rule

Array Validation

ValidationException

Extending with Custom Rules

Using Rules Class Directly

License

MIT


All versions of php-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 timefrontiers/php-validator contains the following files

Loading the files please wait ...