2017 © Pedro Peláez
 

typo3-flow-package settingvalidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

image

digicomp/settingvalidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

  • Monday, March 6, 2017
  • by fcool
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1,907 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

DigiComp.SettingValidator

This Package allows to configure Validators for your Action-Arguments or domain model properties to be set by a new Yaml-File in your Configuration directory., (*1)

Lets imagine you had this action-method:, (*2)

/**
 * @param Order $order
 * @Flow\Validate(type="DigiComp.SettingValidator:Settings")
 */
public function createOrder($order) {...}

Then your Validation.yaml could look like this:, (*3)

SuperVendor\SuperPackage\Domain\Model\Order:
  -
    property: price 
    validator: NumberRange
    options:
      maximum: 20
      minimum: 10
  -
    validator: SuperVendor.SuperPackage:SomeOtherValidator #validates the complete object
    options: []
  -
    property: customer
    validator: DigiComp.SettingValidator:Settings
    options:
      name: OrderCustomer

OrderCustomer:
  -
    property: firstName
    validator: StringLength
    options:
      minimum: 3
      maximum: 20

As you see: Nesting is possible ;) That way you can easily construct flexible structures., (*4)

The SettingsValidator has an optional option: "name" - If you don't give one, it assumes your validation value is an object and searches in Validation.yaml for the FQCN., (*5)

The Versions

06/03 2017

dev-feature/provide-sphinx-docs

dev-feature/provide-sphinx-docs https://github.com/fcool/DigiComp.SettingValidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

  Sources   Download

MIT

The Requires

 

validation flow

21/07 2015

dev-master

9999999-dev https://github.com/fcool/DigiComp.SettingValidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

  Sources   Download

MIT

The Requires

 

validation flow

21/07 2015

1.0.3

1.0.3.0 https://github.com/fcool/DigiComp.SettingValidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

  Sources   Download

MIT

The Requires

 

validation flow

29/04 2015

1.0.2

1.0.2.0 https://github.com/fcool/DigiComp.SettingValidator

Just a TYPO3\Flow Validator resolving other Validators with Configuration/Validation.yaml

  Sources   Download

MIT

The Requires

 

validation flow

19/08 2014

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

18/04 2014

1.0.0

1.0.0.0

  Sources   Download

The Requires