trailblazer / reform

Form objects decoupled from models.
https://trailblazer.to/2.1/docs/reform.html
MIT License
2.49k stars 184 forks source link

Add full_messages_for support #539

Open yogeshjain999 opened 8 months ago

yogeshjain999 commented 8 months ago

ActiveModel has added support to pick errors for specific field using full_messages_for method.

https://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-full_messages_for

SimpleForm seems to be using it to generate errors, but gives exception for reform's errors object.

undefined method `full_messages_for' for Reform::Contract::Result::Errors

This PR adds support to mimic the behaviour.