-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Description
Because of the following code, trestle admin only displays a single error even if mutliple errors exist for a single field. In my specific case there is a multi-select with two errors happening at once. The user will only be shown one at a time and has to fix them one after another.
trestle/lib/trestle/form/fields/form_group.rb
Lines 36 to 40 in 6cbe886
| def error_message | |
| content_tag(:p, class: "invalid-feedback") do | |
| safe_join([icon("fa fa-warning"), errors.first], " ") | |
| end | |
| end |
I would suggest changing errors.first and iterate over all errors, sth. like this:
def error_message
content_tag(:p, class: "invalid-feedback") do
errors.map do |error|
safe_join([icon("fa fa-warning"), error], " ")
end.safe_join("\n")
end
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels