Valid params hash


#1

Hello!

I’m in a situation where I need to validate incoming params and if any of them is invalid redirect to a page with the invalid ones removed. I have a simple Dry::Validation.Params instance and at the moment am doing something like this with the result: result.to_h.except(*result.errors.keys) (except coming from Rails). I was wondering if something like this came up before and if it would make sense to add it to the instance? Alternatively I’d appreciate some other ways I could go about an issue like this.