Skip to content

Commit 393402e

Browse files
committed
Clarify argument validation, fixes rmosolgo#4857
1 parent 01d9a19 commit 393402e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guides/fields/validation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ doc_stub: false
44
search: true
55
section: Fields
66
title: Validation
7-
desc: Rails-like validations for arguments and fields
7+
desc: Rails-like validations for arguments
88
index: 3
99
---
1010

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.
1212

13-
Validations are configured in `field(...)` or `argument(...)` calls:
13+
Validations are configured in `argument(...)` calls on fields or input objects:
1414

1515
```ruby
1616
argument :home_phone, String,
1717
description: "A US phone number",
1818
validates: { format: { with: /\d{3}-\d{3}-\d{4}/ } }
1919
```
2020

21-
or:
21+
or, `validates required: { ... }` inside a `field ... do ... end` block:
2222

2323
```ruby
2424
field :comments, [Comment],

0 commit comments

Comments
 (0)