Download the PHP package accexs/validator without Composer
On this page you can find all versions of the php package accexs/validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download accexs/validator
More information about accexs/validator
Files in accexs/validator
Download accexs/validator
More information about accexs/validator
Files in accexs/validator
Vendor accexs
Package validator
Short Description Extensible OOP PHP input validation package based on wixel/gump (https://wixelhq.com) and laravel
License MIT
Homepage https://github.com/accexs/
Package validator
Short Description Extensible OOP PHP input validation package based on wixel/gump (https://wixelhq.com) and laravel
License MIT
Homepage https://github.com/accexs/
Keywords validatorvalidation
Please rate this library. Is it a good library?
Informations about the package validator
Getting started
Validator class in object oriented PHP based on https://github.com/Wixel/GUMP
Install with composer
Add the following to your composer.json file:
Then open your terminal in your project directory and run:
composer install
or just do:
composer require accexs/validator
Example
Available Validators
- required
Ensures the specified key value exists and is not empty
- email
Checks for a valid email address
- maxlen:n
Checks key value length, makes sure it's not longer than the specified length. n = length parameter.
- minlen,n
Checks key value length, makes sure it's not shorter than the specified length. n = length parameter.
- exact_len:n (TODO)
Ensures that the key value length precisely matches the specified length. n = length parameter.
- alpha
Ensure only alpha characters are present in the key value (a-z, A-Z)
- alpha_num
Ensure only alpha-numeric characters are present in the key value (a-z, A-Z, 0-9)
- alphadash `Ensure only alpha-numeric characters + dashes and underscores are present in the key value (a-z, A-Z, 0-9, -)`
- alpha_space (TODO)
Ensure only alpha-numeric characters + spaces are present in the key value (a-z, A-Z, 0-9, \s)
- numeric
Ensure only numeric key values
- integer
Ensure only integer key values
- boolean
Checks for PHP accepted boolean values, returns TRUE for "1", "true", "on" and "yes"
- float
Checks for float values
- url
Check for valid URL or subdomain
- ip
Check for valid generic IP address
- ipv4
Check for valid IPv4 address
- ipv6
Check for valid IPv6 address
- creditcard
Check for a valid credit card number (Uses the MOD10 Checksum Algorithm)
- contains:n (TODO)
Verify that a value is contained within the pre-defined value set
- contains_list:n (TODO)
Verify that a value is contained within the pre-defined value set. The list of valid values must be provided in semicolon-separated list format (like so: value1;value2;value3;..;valuen). If a validation error occurs, the list of valid values is not revelead (this means, the error will just say the input is invalid, but it won't reveal the valid set to the user.
- doesnt_contain_list:n (TODO)
Verify that a value is not contained within the pre-defined value set. Semicolon (;) separated, list not outputted. See the rule above for more info.
- min_numeric (TODO)
Determine if the provided numeric value is higher or equal to a specific value
- max_numeric (TODO)
Determine if the provided numeric value is lower or equal to a specific value
- date
Determine if the provided input is a valid date (ISO 8601)
- starts
Ensures the value starts with a certain character / set of character
- phone_number
Validate phone numbers that match the following examples: 555-555-5555 , 5555425555, 555 555 5555, 1(519) 555-4444, 1 (519) 555-4422, 1-555-555-5555
- regex
You can pass a custom regex using the following format: 'regex,/your-regex/'
- json
validate string to check if it's a valid json format
Creating your own validators
Adding custom validators and filters is made easy by using callback functions.
Set Custom Field Names
You can easily override your form field names for improved readability in errors using the GUMP::set_field_name($field, $readable_name)
method as follows:
All versions of validator with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6
The package accexs/validator contains the following files
Loading the files please wait ....