coerce stringy booleans
This commit is contained in:
parent
7704d82c6f
commit
0caf5a61c7
@ -1822,8 +1822,12 @@ coerce({_, _, signature}, Bin, from_fate) ->
|
||||
{ok, unicode:characters_to_list(Address)};
|
||||
coerce({_, _, boolean}, true, _) ->
|
||||
{ok, true};
|
||||
coerce({_, _, boolean}, "true", _) ->
|
||||
{ok, true};
|
||||
coerce({_, _, boolean}, false, _) ->
|
||||
{ok, false};
|
||||
coerce({_, _, boolean}, "false", _) ->
|
||||
{ok, false};
|
||||
coerce({O, N, boolean}, S, _) ->
|
||||
single_error({invalid, O, N, S});
|
||||
coerce({O, N, string}, Str, Direction) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user