mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
ead4776b82
### Summary The [`:field_error_proc`](https://github.com/rails/rails/blob/master/actionview/lib/action_view/base.rb#L145) is responsible for decorating input tags that refer to attributes with errors. This default build-in rails feature wrap invalid form elements with additional markup: `<div class="field_with_errors">[…]</div>`. * Fix for `field_error_proc` wraps form select `optgroup` * Fix for `field_error_proc` wraps form select divider `option` * Add tests for uncovered elements with errors [Fixes #31088] #### Test coverage * `test_select_grouped_options_with_errors` * `test_time_zone_select_with_priority_zones_and_errors` #### Extend test coverage * `test_collection_select_with_errors` * `test_label_with_errors` * `test_check_box_with_errors` * `test_check_boxes_with_errors` * `test_radio_button_with_errors` * `test_radio_buttons_with_errors` * `test_collection_check_boxes_with_errors` * `test_collection_radio_buttons_with_errors` |
||
---|---|---|
.. | ||
erb | ||
form_helper | ||
testing | ||
active_model_helper_test.rb | ||
asset_tag_helper_test.rb | ||
atom_feed_helper_test.rb | ||
capture_helper_test.rb | ||
compiled_templates_test.rb | ||
controller_helper_test.rb | ||
date_helper_i18n_test.rb | ||
date_helper_test.rb | ||
dependency_tracker_test.rb | ||
digestor_test.rb | ||
erb_util_test.rb | ||
form_collections_helper_test.rb | ||
form_helper_test.rb | ||
form_options_helper_i18n_test.rb | ||
form_options_helper_test.rb | ||
form_tag_helper_test.rb | ||
html_test.rb | ||
javascript_helper_test.rb | ||
log_subscriber_test.rb | ||
lookup_context_test.rb | ||
number_helper_test.rb | ||
output_safety_helper_test.rb | ||
partial_iteration_test.rb | ||
record_identifier_test.rb | ||
record_tag_helper_test.rb | ||
render_test.rb | ||
resolver_cache_test.rb | ||
resolver_patterns_test.rb | ||
sanitize_helper_test.rb | ||
streaming_render_test.rb | ||
tag_helper_test.rb | ||
template_error_test.rb | ||
template_test.rb | ||
test_case_test.rb | ||
test_test.rb | ||
text_helper_test.rb | ||
text_test.rb | ||
translation_helper_test.rb | ||
url_helper_test.rb |