2017 © Pedro Peláez
 

library validation-interface

A base interface for validators

image

dhii/validation-interface

A base interface for validators

  • Wednesday, March 7, 2018
  • by XedinUnknown
  • Repository
  • 3 Watchers
  • 0 Stars
  • 5,457 Installations
  • PHP
  • 8 Dependents
  • 1 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 30 % Grown

The README.md

Dhii - Validation - Interface

Build Status Code Climate Test Coverage Latest Stable Version [This package complies with Dhii standards][Dhii], (*1)

Simple interface for most basic validator implementations., (*2)

Details

This package aims to standardize validators, so as to make consuming code compatible with a wide variety of validator implementations. Validation is such a common task that being able to validate in an interoperable way is extremely useful. Interfaces in this package aim to fix that by providing a common validation entry point on one side, and standards-compliant validation error exceptions on the other. This allow developers to take advantage of exception "bubbling" and handle validation errors where they think best, as well as to retrieve a list of human-readable validation error messages without knowledge of the validator internals, or prior reference to the validator object. Also, reporting validation failure as an exception is very convenient for cases where it is only possible to continue if a validation subject is valid., (*3)

Interfaces

  • [ValidatorInterface] - The central interface of the standard. Provides validation entry point (trigger) as validate(). Validators MUST implement this interface.
  • [ValidatorAwareInterface] - Something that has a validator.
  • [SubjectAwareInterface] - Something that knows about the validation subject.
  • [SpecAwareInterface] - Something that knows about the validation specification.
  • [ValidationFailedExceptionInterface] - Occurs when subject fails validation, and reports the failed subject, and the validator that validated the subject, as well as a list of validation error messages.
  • [ValidationExceptionInterface] - Represents an error related to a validator.

The Versions

07/03 2018

dev-task/9_deprecate-spec-validator-interface

dev-task/9_deprecate-spec-validator-interface

A base interface for validators

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

06/03 2018

v0.2-alpha1

0.2.0.0-alpha1

A base interface for validators

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

05/09 2017

dev-release/0.2

dev-release/0.2

A base interface for validators

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

19/08 2017

dev-task/3-validation-exceptions-unaware-of-validator

dev-task/3-validation-exceptions-unaware-of-validator

A base interface for validators

  Sources   Download

MIT

The Requires

  • php ^5.3 | ^7.0

 

The Development Requires

by Dhii Team

06/08 2017

dev-task/customize-validation-logic

dev-task/customize-validation-logic

A base interface for validators

  Sources   Download

MIT

The Requires

  • php ^5.3 | ^7.0

 

The Development Requires

by Dhii Team

10/03 2017

dev-master

9999999-dev

A base interface for validators

  Sources   Download

MIT

The Requires

  • php ^5.3 | ^7.0

 

The Development Requires

by Dhii Team

10/03 2017

v0.1

0.1.0.0

A base interface for validators

  Sources   Download

MIT

The Requires

  • php ^5.3 | ^7.0

 

The Development Requires

by Dhii Team