From 811a6cc254e1cc3380b3e318d4f2544d7667f59c Mon Sep 17 00:00:00 2001 From: Tsehau Chao Date: Thu, 1 Jun 2017 16:38:10 +0800 Subject: [PATCH] update code example for form access --- gems/reform/validation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gems/reform/validation.md b/gems/reform/validation.md index 2f914e03..de807145 100644 --- a/gems/reform/validation.md +++ b/gems/reform/validation.md @@ -109,7 +109,7 @@ The purest form of defining validations with this backend is by using a [validat Custom predicates have to be defined in the validation group. If you need access to your form you must add `option :form` to your configure block. - validation :default do + validation(name: :default, with: { form: true } ) do configure do option :form @@ -123,7 +123,7 @@ Custom predicates have to be defined in the validation group. If you need access In addition to dry-validation's API, you have access to the form that contains the group via `form`. - validation :default do + validation(name: :default, with: { form: true } ) do configure do option :form