Download the PHP package michele-angioni/phalcon-validators without Composer
On this page you can find all versions of the php package michele-angioni/phalcon-validators. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download michele-angioni/phalcon-validators
More information about michele-angioni/phalcon-validators
Files in michele-angioni/phalcon-validators
Package phalcon-validators
Short Description New advanced validators for PHP Phalcon Framework.
License MIT
Informations about the package phalcon-validators
Phalcon Validators
Introduction
Phalcon Validators adds several new validators to the few default ones present in Phalcon.
PHP 7.1+ and Phalcon 3.1 are required.
Installation
Support can be installed through Composer, just include "michele-angioni/phalcon-validators": "~2.0"
to your composer.json and run composer update
or composer install
.
Usage
The new validators work in the same way the default validators do.
Just pass a new instance of the validator to the Phalcon Validation
class, with the desired options, and then validate it.
Available validators with practical examples:
IpValidator
The IpValidator validates a valid ip address.
// Validation succeeded without errors
NumericValidator
The default NumericValidator only allows for numeric (i.e. 0-9) characters. Minimum and maximum values can be specified.
Optionally, it can support float values, that is allowing a dot (.) character to separate decimals.
Optionally also signed numbers are supported.
AlphaNumericValidator
The AlphaNumericValidator allows for alphanumeric characters. Optionally, it can allow underscores, minuses and white spaces. Minimum and maximum string lengths can be specified.
AlphaNamesValidator
The AlphaNamesValidator allows for alphabetic, menus, apostrophe, underscore and white space characters. Optionally, it can allow also numbers (i.t. 0-9). Minimum and maximum string lengths can be specified.
AlphaCompleteValidator
The AlphaCompleteValidator allows for alphanumeric, underscore, white space, slash, apostrophe, round and square brackets/parentheses and punctuation characters. Optionally, it can allow also pipes (|), ATs (@), backslashes (), percentages (%) and Url Characters (equals (=) and hashtags (#)). Minimum and maximum string lengths can be specified.
FileNameValidator
The FileNameValidator allows for a valid file name with extension, allowing simple letters, numbers underscores and minuses. Optionally, it can allow also all Latin characters, multiple dots and white spaces. Minimum and maximum string lengths can be specified.
Contribution guidelines
Phalcon Validators follows PSR-1, PSR-2 and PSR-4 PHP coding standards, and semantic versioning.
Pull requests are welcome.
License
Phalcon Validators is free software distributed under the terms of the MIT license.
All versions of phalcon-validators with dependencies
ext-phalcon Version >=3.1.2