Skip to content

Overriding the field_error_proc #174

@akaspick

Description

@akaspick

Globally overwriting the field_error_proc can cause issues if multiple form builders are used in the same app.

A potential solution is to use a similar technique that is used in https://github.com/plataformatec/simple_form, specifically here..

https://github.com/plataformatec/simple_form/blob/48cab46ca4d26236b446d870f5d25cd27e4b4701/lib/simple_form.rb#L175-L178

and here...

https://github.com/plataformatec/simple_form/blob/c3a307cb9501208e053f771738e34a3d93d33858/lib/simple_form/action_view_extensions/form_helper.rb#L41-L49

which only changes the field_error_proc within the custom form builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions