Open songhuangcn opened 7 years ago
Is there a way to validate JSON type param?
My request params is like:
{ "user": { "email": "tom@a.com", "password": "password" } }
And I tried to validate it by this:
param :user, Hash do param :email, String, :required => true param :password, String, :required => true end
But it tell me that the user is not a Hash type, how can I solve it?
Thanks.
@songhuangcn did you find a workaround?
Is there a way to validate JSON type param?
My request params is like:
And I tried to validate it by this:
But it tell me that the user is not a Hash type, how can I solve it?
Thanks.