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

Allow custom coercion failure messages #1203

Closed
wants to merge 1 commit into from

Commits on Jul 2, 2016

  1. allow custom param coercion failure messages

    Custom param types can now report why coercion failed in their .parse
    method by returning an InvalidValue initialized with an error message.
    For example:
    
      Grape::Validations::Types::InvalidValue.new "is too short"
    Matt Zukowski authored and Matt Zukowski committed Jul 2, 2016
    Configuration menu
    Copy the full SHA
    ce9f494 View commit details
    Browse the repository at this point in the history