Download the PHP package grandadevans/laravel-form-validator without Composer

On this page you can find all versions of the php package grandadevans/laravel-form-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-form-validator

Laravel Form Validator

Build Status

Contents

Introduction

After using Jeffrey Way's Generator and his Validator package for a while now I got fed up of copying and pasting the contents of the form validation files so thought I'd create my own version.

What will this do?

This package will create a form validation file containing a list or rules for the validation package to validate.

Why not just folk the generators package?

Well I still only have 3 or 4 clients as a Freelance Web Developer and this gives me the perfect opportunity to show my coding skills off. That way when people ask me if I have any work I can show them it doesn't seem like I'm making excuses when I mention "white label" and "non disclosure agreements".

Installation

Install this package through Composer.

Then include the service provider in your app/config/app.php by adding it to your "providers" array:

Don't forget that composer.json will need to know where to autoload the form from. So if the forms are kept in the default app/Forms directory you could just add it to the classMap

Also: as you have changed the classMap you will have to run

Usage

From the command line you can call the package with

From the root directory of your Laravel installation.

Required Argument

There is only one required argument and that is the name of the form

Options

The Rules Option

This is where the command really comes into it's own. The rules string should be made up of the following

  1. The name of the input field to validate followed by a pipe ( | )
  2. A list of the conditions that the input is to validate against. Each condition being separated by another colon ( *pipe** )
  3. If you wish to validate another field then separate them with an ampersand ( & ) and carry on.

Example: If I wanted to validate a typical login form containing a username and password field I would set the rules option as follows

Each condition that is entered (required, confirmed etc) will be validated against the available conditions in Laravel docs.

Once the command is executed a Form is generated and placed in the specified directory (or the default app/Forms).

Inject and Type hint the generated form into your controller (or where you wish to do your validation)

Try to validate the input with

Example

Let's say I want to create the above mentioned login form

Step 1: Create the form

I can then view the form at app/Forms/FooForm.php.

Step 2: Inject the form into your controller/model

Step 3: Validate the input

Tests

During the construction of this package I have carried out testing with

I also have travis monitoring the condition of the build for failures and you can check on it's progress by visiting it's Travis CI page

if you want to see the test results navigate to vendor/grandadevans/laravel-form-validator and run

You can then run the tests individually

or you can run the test script to show all results

GitHub and Packagist

You can find this package through Github and Packagist


All versions of laravel-form-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
laracasts/validation Version ~1.2.0
illuminate/support Version 4.2.*
illuminate/console Version 4.2.*
illuminate/config Version 4.2.*
illuminate/filesystem Version 4.2.*
mustache/mustache Version v2.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package grandadevans/laravel-form-validator contains the following files

Loading the files please wait ....