Skip to content

Commit 7cccb2b

Browse files
committed
fix docs on format registration
1 parent 5333e94 commit 7cccb2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,9 @@ end
949949

950950
You may register custom formatters that can be utilized in your schemas.
951951

952-
The `transform` proc accepts a params hash, as well as optional `controller`
953-
and `schema` keywords. The proc should return the formatted params.
952+
Each format consists of, at minimum, a `transform:` lambda, accepting a params
953+
hash, as well as optional `controller:` and `schema:` keywords, and returning
954+
the formatted params. For more usage examples, see [the default formatters](https://github.com/keygen-sh/typed_params/tree/master/lib/typed_params/formatters).
954955

955956
```rb
956957
TypedParams::Formatters.register(:strong_params,

0 commit comments

Comments
 (0)