2017 © Pedro Peláez
 

library validator-alphabet

Validator to validate messages against a given alphabet

image

hylianshield/validator-alphabet

Validator to validate messages against a given alphabet

  • Sunday, January 1, 2017
  • by johmanx10
  • Repository
  • 2 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 67 % Grown

The README.md

Introduction

The alphabet validator is a validator that will validate given messages against a configured alphabet., (*1)

Installation

composer require hylianshield/validator-alphabet:^1.0

Usage

The alphabet validator accepts an alphabet instance. It is based on the PCRE validator., (*2)

<?php
use \HylianShield\Alphabet\Alphabet;
use \HylianShield\Validator\Alphabet\AlphabetValidator;

$alphabet  = new Alphabet('A', 'B', 'C');
$validator = new AlphabetValidator($alphabet);

echo $validator->getIdentifier();

Outputs:, (*3)

pcre(/^[ABC]*$/)

Testing

To run the unit tests, to check the code, simply run one of the pre-configured composer scripts:, (*4)

  • composer test Runs PHPUnit
  • composer coverage Runs PHPUnit with text coverage
  • composer coverage-html Runs PHPUnit with HTML coverage and opens the result in the browser.

The Versions

01/01 2017

dev-master

9999999-dev

Validator to validate messages against a given alphabet

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

01/01 2017

1.0.1

1.0.1.0

Validator to validate messages against a given alphabet

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

01/01 2017

1.0.0

1.0.0.0

Validator to validate messages against a given alphabet

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires