-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] render errors as part of the label only #29207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -270,7 +270,7 @@ | |||
{# Errors #} | |||
|
|||
{% block form_errors -%} | |||
{%- if errors|length > 0 -%} | |||
{%- if render_errors|default(false) and errors|length > 0 -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure i get it.. this makes form_errors
practically a no-op by default right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and that's also why I am not convinced that we should make the change in core. It might break custom form themes. I rather tend to fix the documentation instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could work like form_rest is working maybe; only render errors in form_errors
if not already rendered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either way, 👍 for better docs: customizing form errors inside the label vs. outside the label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe make the current feature more explicit: form_label_with_errors
? so if you start customizing based on core files you'll understand you need to pick form_label+form_errors vs. form_label_with_errors
What's the status here? |
alternative to #29188