Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep attribute matching (querying/addressability) #1

Open
bruce opened this issue Sep 17, 2014 · 2 comments
Open

Deep attribute matching (querying/addressability) #1

bruce opened this issue Sep 17, 2014 · 2 comments

Comments

@bruce
Copy link
Contributor

bruce commented Sep 17, 2014

It would be useful to have "attributes" be anything that we can find with Kernel.get_in:

Vex.valid? article, %{ [:author, :name] => [presence: true] }
@jtmoulia
Copy link
Contributor

Is this fixed by #4?

@Qqwy
Copy link

Qqwy commented Aug 16, 2018

@jtmoulia It does not seem to be the case:

iex> Vex.errors(%{foo: %{bar: 10}}, %{[:foo, :bar] => [presence: true]})
[{:error, [:foo, :bar], :presence, "must be present"}]

Vex.errors(%{[:foo, :bar] => 10}, %{[:foo, :bar] => [presence: true]}) 
[]

So [:foo, :bar] is still taken as a whole as key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants