replaces tabs with spaces
This commit is contained in:
parent
87544c3976
commit
e8c94b15a1
1 changed files with 29 additions and 29 deletions
54
README.md
54
README.md
|
@ -7,37 +7,37 @@ Yaml-File in your Configuration directory.
|
|||
|
||||
Lets imagine you had this action-method:
|
||||
|
||||
/**
|
||||
* @param Order $order
|
||||
* @Flow\Validate(type="DigiComp.SettingValidator:Settings")
|
||||
*/
|
||||
public function createOrder($order) {...}
|
||||
/**
|
||||
* @param Order $order
|
||||
* @Flow\Validate(type="DigiComp.SettingValidator:Settings")
|
||||
*/
|
||||
public function createOrder($order) {...}
|
||||
|
||||
Then your Validation.yaml could look like this:
|
||||
|
||||
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
|
||||
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
|
||||
OrderCustomer:
|
||||
-
|
||||
property: firstName
|
||||
validator: StringLength
|
||||
options:
|
||||
minimum: 3
|
||||
maximum: 20
|
||||
|
||||
|
||||
As you see: Nesting is possible ;) That way you can easily construct flexible structures.
|
||||
|
|
Loading…
Reference in a new issue