Skip to content

Commit 80be172

Browse files
authored
Change allow_nil to the correct allow_null
According to the docs (in section "Constructor Details"), `allow_null` is the name of the option accepted by all validators not `allow_nil` (docs: https://graphql-ruby.org/api-doc/1.12.8/GraphQL/Schema/Validator.html)
1 parent 4eff70c commit 80be172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/fields/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Validations can be provided with a keyword (`validates: { ... }`) or with a meth
3737
All the validators below accept the following options:
3838

3939
- `allow_blank: true` will permit any input that responds to `.blank?` and returns true for it.
40-
- `allow_nil: true` will permit `nil` (bypassing the validation)
40+
- `allow_null: true` will permit `null` (from JS) and/or `nil` (from Ruby) (bypassing the validation)
4141
- `message: "..."` customizes the error message when the validation fails
4242

4343
For example:

0 commit comments

Comments
 (0)