Skip to content

Commit

Permalink
chore: fix typo in a private function name
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeTupchiy committed Mar 13, 2024
1 parent 0023af8 commit e1d128f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hocon_tconf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ user_defined_validators(Schema) ->
validators(field_schema(Schema, validator)).

builtin_validators(?ENUM(Symbols)) ->
[fun(Value) -> check_enum_sybol(Value, Symbols) end];
[fun(Value) -> check_enum_symbol(Value, Symbols) end];
builtin_validators(Type) ->
TypeChecker = fun(Value) ->
case typerefl:typecheck(Type, Value) of
Expand All @@ -1122,12 +1122,12 @@ builtin_validators(Type) ->
end,
[TypeChecker].

check_enum_sybol(Value, Symbols) when is_atom(Value); is_integer(Value) ->
check_enum_symbol(Value, Symbols) when is_atom(Value); is_integer(Value) ->
case lists:member(Value, Symbols) of
true -> ok;
false -> {error, not_a_enum_symbol}
end;
check_enum_sybol(_Value, _Symbols) ->
check_enum_symbol(_Value, _Symbols) ->
{error, unable_to_convert_to_enum_symbol}.

validate(Opts, Schema, Value, Validators) ->
Expand Down

0 comments on commit e1d128f

Please sign in to comment.