Download the PHP package harryosmar/plugin-validation without Composer
On this page you can find all versions of the php package harryosmar/plugin-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download harryosmar/plugin-validation
More information about harryosmar/plugin-validation
Files in harryosmar/plugin-validation
Package plugin-validation
Short Description PHP Composer Plugin for Validation
License
Homepage https://github.com/harryosmar/plugin-validation
Informations about the package plugin-validation
Validation
Composer plugin for validation purpose, contains set of validation rules.
Features
- Multi Language, available
en
,id
, or use your own custom translation - Validation for multi
fields
and afield
can have multirules
Installation
Add this composer.json file
Then running
Or type
in composer.json
root directory
How To Use
- 1. initialize
- 2. add
fields
to$validation
object - 3. call the
$validation
run
method - 4, get the errors message if
$status
isfalse
- validation option with
break
validation chain
1. initialize
2. add fields
to $validation
object
3. call the $validation
run
method
4. get the errors message if $status
is false
$erros
values
validation with option break
validation chain
You can break
the validation chain
if there is a field
get an error. In step 3
, when calling the method run
of $validation
object, add parameter true
to enable break the chain when error occured
then $erros
values will be
2 Types Validation
- Validation
- Form Validation
Validation
see the sample code
Form Validation
The $erros
will be
Field
There are 2 type of field
available :
- Field with single value
PluginSimpleValidate\Field
The $errors
will be
- Field with multi values
PluginSimpleValidate\MultiValues\Field
The $errors
will be
Available Rules
- required
- numeric
- aplha
- alpha or numeric
- decimal
- natural
- natural with no zero
- equal
- less than
- greater than
- less or equal than
- greater or equal than
- between
- between or equal
- length
- length less than
- length greater than
- length less or equal than
- length greater or equal than
- length between
- length between or equal
is true
forcustom rule logic
- valid phone
required
numeric
email
aplha
alpha or numeric
decimal
natural
natural with no zero
equal
less than
greater than
less or equal than
greater or equal than
between
between or equal
length
length less than
length greater than
length less or equal than
length greater or equal than
length between
length between or equal
is true
for custom rule logic
valid phone
Custom translation
If you want to use your own translation, when instantiate Language
class provide the parameter $translation
array
Submitting bugs and feature requests
Harry Osmar Sitohang - https://github.com/harryosmar
See also the list of contributors which participated in this project.
All versions of plugin-validation with dependencies
giggsey/libphonenumber-for-php Version ^8.8
zendframework/zend-diactoros Version ^1.7