2017 © Pedro Peláez
 

library validation

image

lamiaoy/validation

  • Thursday, July 6, 2017
  • by LamiaOy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 620 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 37 % Grown

The README.md

README

General Validation library, (*1)

Overview and structure

The library provides a collection of interfaces and some default implementations for the task of validation., (*2)

ValidationUtils is an interface of common functions that can be shared through validating classes (typically implementing for example TypeValidation), (*3)

ValidationDefaultValues is an interface providding a list of default values for validation constraints so if the constraint x is not set for field y, the constraint x will be validated against default value for field y (this way only the values differing from default need to be confed)., (*4)

  • ValidationDefaultValuesImpl is an implementing class that takes it's values from ini file that is injected as a path to constructor of the class.

ValidationCollection is a collection of TypeValidations., (*5)

TypeValidation is a general interface for a simple validation., (*6)

  • Implementing base class is AbstractTypeValidation, (*7)

    • Common validation functions injected as ValidationUtils interface
    • Default values injected as ValidationDefaultValues interface
  • ArrayValidation, StringValidation etc typically extend AbstractTypeValidation, (*8)

  • GeneralValidation is an implementation that coordinates a group of TypeValidation implementations injected to it in ValidationCollection through constructor. The TypeValidation implementation of given type is used for validating, unless not defined whereas the default type is used., (*9)

Validation is a general interface for taking an array of fields and validating them with constructor injected TypeValidation against the field constraint configuration also injected into constructor., (*10)

Example usage

Contribution guidelines

  • Implementation classes must be unit tested

The Versions

06/07 2017

dev-master

9999999-dev

  Sources   Download

The Development Requires

06/07 2017

1.0.2

1.0.2.0

  Sources   Download

The Development Requires

24/02 2017

1.0.1

1.0.1.0

  Sources   Download

The Development Requires

23/02 2017

1.0.0

1.0.0.0

  Sources   Download

The Development Requires