From e8c94b15a14c1c5a0d34e051232eefdbe8d85b59 Mon Sep 17 00:00:00 2001 From: Robin Krahnen Date: Wed, 11 Mar 2020 12:00:42 +0100 Subject: [PATCH] replaces tabs with spaces --- README.md | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 4168f8a..6735a0e 100644 --- a/README.md +++ b/README.md @@ -7,40 +7,40 @@ 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 - - OrderCustomer: - - - property: firstName - validator: StringLength - options: - minimum: 3 - maximum: 20 + 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. 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. \ No newline at end of file +object and searches in Validation.yaml for the FQCN.