Hi, if I have a input with multiple keys, it would be possible to stop the validation if a given key fails validation? I need to perform api calls on subsequent keys, so it would be a waste to do it if x or z key->values fails
example:
%{
"chain" => [required: true, custom: validate_supported_chain(), type: :string],
"coin" => [required: true, type: :string, max: 20],
"payload" => [required: true, type: :string, custom: validate_qrcode(), max: 180],
}
def validate_supported_chain() do
fn %{value: value} ->
case Map.fetch(@supported_chain, String.downcase(value)) do
{:ok, value} -> Validate.Validator.success(value)
:error -> Validate.Validator.halt("rede não suportada")
end
end
end
if validate_qrcode makes an api call, would be possible to avoid this api call if supported_chain fails?