Skip to content

Instantly share code, notes, and snippets.

@rnewson
Created September 23, 2015 17:36
Show Gist options
  • Save rnewson/ac268902268d1e20ea9c to your computer and use it in GitHub Desktop.
Save rnewson/ac268902268d1e20ea9c to your computer and use it in GitHub Desktop.
validate_view(Language, VName, {Views}) ->
case {Language, couch_util:get_value(<<"map">>, Views)} of
{<<"query">>, {[_ | _]}} ->
ok;
{_, MapVal} when is_binary(MapVal) ->
ok;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment