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

Using identical param keys in groups results in wrong params #5

Closed
tjheeta opened this issue Jun 17, 2015 · 1 comment
Closed

Using identical param keys in groups results in wrong params #5

tjheeta opened this issue Jun 17, 2015 · 1 comment

Comments

@tjheeta
Copy link

tjheeta commented Jun 17, 2015

For example, using the following params:

       params do                                                               
          requires :type, type: Atom, values: [:record]                         
          group :data, type: Map do                                             
            requires :name, type: String, regexp: ~r"^[a-zA-Z0-9\-\.]+$"        
            requires :type, type: String, regexp: ~r"^[a-zA-Z0-9]+$"            
          end                                                                   
        end          

Submitting this:

{data: %{name: "www", type: "a"}, type: "record"}

Will result with the following parameters:

%{data: %{name: "www", type: "record"}, type: :record}

The expected result is:

%{data: %{name: "www", type: "a"}, type: :record}
@falood
Copy link
Member

falood commented Jun 17, 2015

Thank you.
I guess the reason of the problem is the param :type, I'll fix this as soon as possible.

@falood falood closed this as completed in 65e0345 Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants