grape-entity icon indicating copy to clipboard operation
grape-entity copied to clipboard

multiple error messages when used as params

Open Aryk opened this issue 7 years ago • 0 comments

class Entity < Grape::Entity
   expose :car,  documentation: { type: String, values: ["foo", "bar"] }
end

And then use it as validation with

params do 
  requires :all, using: Entity.documentation
end

"car is missing, car does not have a valid value"

Anyway, for it to just have the second one of the error messages? If I don't make it required then it does not show up at all.

Aryk avatar Mar 18 '17 06:03 Aryk