Download the PHP package alexpts/simple-validator without Composer
On this page you can find all versions of the php package alexpts/simple-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexpts/simple-validator
More information about alexpts/simple-validator
Files in alexpts/simple-validator
Package simple-validator
Short Description Simple validate request data
License MIT
Homepage https://github.com/alexpts/simple-validator
Informations about the package simple-validator
simple-validator
Simple validator for validate accos arrays.
Install
composer require alexpts/simple-validator
Example
Validators:
string
The field under validation must be string
int
The field under validation must be integer
float
The field under validation must be float
array
The field under validation must be array
required
Required field
betweenInt:min:max
Int from range [min, max]
betweenFloat:min:max
Float from range [min, max]
bool
The field under validation must be boolean
alpha
The field under validation must be entirely alphabetic characters
alphaDash
The field under validation may have alpha-numeric characters, as well as dashes and underscores
alphaNum
The field under validation must be entirely alpha-numeric characters
date
The field under validation must be a valid date according to the strtotime PHP function
dateTime
Value instance of \DateTime object
inArray
Check value in array
min
Min length fot string, min value for number, min count for array
max
Max length fot string, max value for number, max count for array
The field under validation must be simple email string
Custom validator
You can add custom validator via method