2017 © Pedro Peláez
 

library input-validation

Very simple Form Input Validation for when you want to use your own existing forms.

image

vbpupil/input-validation

Very simple Form Input Validation for when you want to use your own existing forms.

  • Thursday, April 12, 2018
  • by vbpupil
  • Repository
  • 1 Watchers
  • 0 Stars
  • 216 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 16 Versions
  • 51 % Grown

The README.md

InputValidation

Simple form input validation. To be used when you need a quick on the fly no nonsense validation., (*1)

This simple class is not meant to replace some of he more advanced validation scripts, its simply a substitute for when you have pre existing forms that are not part of any form solution and just need to validate simply and quickly. Validation now includes CSRF which is handled via $_SESSION., (*2)

Install

A. In your terminal enter composer require vbpupil/input-validation, (*3)

B. Once installed you will need to take a copy of the config directory and place it to be outside of the vendor dir, ie, (*4)

project
│
└───config
│   │
│   └───InputValidation
│               config.yml
│   
└───vendor
    │
    └───vbpupil

This directory contains a yaml file that allow you to manage your definitions aswell as err and success return text., (*5)

Usage

Create your form as normal., (*6)

  1. note that textarea has a * at the end of the name, this means that it is not a required field so will only be validated if text is present., (*7)

  2. also note that if you require CSRF support then simply add in the call below. The argument sent in form-1 is the unique id for the form. Also worth noting that session start is required before the call to ensure that the SESSION values persist., (*8)





= InputValidation::createToken('form-1') ?>



``` 3. include the package. ```php use vbpupil\InputValidation; include 'vendor/autoload.php';
  1. set which inputs you want to check;, (*9)

    //indicates what inputs it should be checking
    $check = array('telephone','postcode','mobile','textarea');
    
    
  2. implement check upon post., (*10)

```php if(isset($_POST)) { $r = InputValidation::validate($_POST, $check);, (*11)

  var_dump($r);

} ```, (*12)

The Versions

12/04 2018

dev-master

9999999-dev

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

12/04 2018

3.1.1

3.1.1.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

12/04 2018

3.1.0

3.1.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

11/04 2018

3.0.2

3.0.2.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

11/04 2018

dev-feature/acceptance_tests

dev-feature/acceptance_tests

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

03/04 2018

3.0.1

3.0.1.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

03/04 2018

dev-feature/CSRF

dev-feature/CSRF

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

29/03 2018

3.0.0

3.0.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

07/03 2018

2.6.0

2.6.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.5

2.5.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.4

2.4.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.3

2.3.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.2

2.2.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.1

2.1.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL 3.0

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

06/03 2018

2.0

2.0.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL 3.0

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex

15/02 2018

1.0

1.0.0.0

Very simple Form Input Validation for when you want to use your own existing forms.

  Sources   Download

GPL 3.0

The Requires

 

The Development Requires

by Dean Haines

form validation validate input regex