File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,21 @@ doc_stub: false
4
4
search : true
5
5
section : Fields
6
6
title : Validation
7
- desc : Rails-like validations for arguments and fields
7
+ desc : Rails-like validations for arguments
8
8
index : 3
9
9
---
10
10
11
- Fields (and their arguments, and input object arguments) can be validated at runtime using built-in or custom validators.
11
+ Arguments can be validated at runtime using built-in or custom validators.
12
12
13
- Validations are configured in ` field (...)` or ` argument(...) ` calls :
13
+ Validations are configured in ` argument (...)` calls on fields or input objects :
14
14
15
15
``` ruby
16
16
argument :home_phone , String ,
17
17
description: " A US phone number" ,
18
18
validates: { format: { with: /\d {3} -\d {3} -\d {4} / } }
19
19
```
20
20
21
- or:
21
+ or, ` validates required: { ... } ` inside a ` field ... do ... end ` block :
22
22
23
23
``` ruby
24
24
field :comments , [Comment ],
You can’t perform that action at this time.
0 commit comments