2017 © Pedro Peláez
 

symfony-bundle query-param-validator-bundle

Validate Query Param values

image

skowronline/query-param-validator-bundle

Validate Query Param values

  • Thursday, January 5, 2017
  • by skowron-line
  • Repository
  • 2 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

QueryParamValidatorBundle

Bundle helps you validate request query string values, (*1)

Build Status codecov.io SensioLabsInsight, (*2)

Installation

composer require skowronline/query-param-validator-bundle
// app/config.yml
imports:
    ...
    - { resource: '@SkowronlineQueryParamValidatorBundle/Resources/config/services.yml' }

Usage

/**
 * @QueryParam("order", allowed={"asc", "desc"}, required=true)
 */
public function indexAction()
/route -> 404 Page Not Found
/route?order=asc -> 200 Ok
/route?order=desc -> 200 Ok
/route?order=random -> 404 Page Not Found

You can use multiple annotations, (*3)

/**
 * @QueryParam("order", allowed={"asc", "desc"}, required=true)
 * @QueryParam("page", required=false)
 */
public function indexAction()

The Versions

05/01 2017

dev-master

9999999-dev

Validate Query Param values

  Sources   Download

MIT

The Requires

 

The Development Requires

by krzysztof skaradzinski

validation querystring

05/01 2017

v1.0.0

1.0.0.0

Validate Query Param values

  Sources   Download

MIT

The Requires

 

The Development Requires

by krzysztof skaradzinski

validation querystring