Skip to content

Commit 39ef7ab

Browse files
committed
Further clarify documentation
1 parent 8615554 commit 39ef7ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ex_structable/hooks.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ defmodule ExStructable.Hooks do
4141
4242
The return value is the return value of
4343
`YourModule.new/2`/`YourModule.put/3`, so usually returns a struct when
44-
validation passes.
44+
validation passes. (You could return something else if you want to.)
4545
4646
When validation fails you should raise, or return a custom error value such
4747
as `{:error, struct, reason}`. If validation fails, one option would be to
4848
alter the struct so that it is valid. The choice of implementation is up to
49-
the developer.
49+
you.
5050
5151
By default returns the given struct without any checking.
5252

0 commit comments

Comments
 (0)