Bootstrap 4: Validation error messages in red font color

Volker Lamp <[email protected]>
Newsgroups gmane.comp.jakarta.tapestry.devel
Message-ID <CANDv2OGZm+O73newV2kLfYNphm5nrcZJxd3z0FtwZ2yX5R1GiA@mail.gmail.com>
Hello, Tapestry developers -

Using Tapestry's BeanEditor component with Bootstrap 4, I'm trying to get
validation error messages appear with a red font color like they used to
with Bootstrap 3.

Trying to understand from the Tapestry source code why Tapestry outputs
Bootstrap v3-style "help-block" instead of v4-style "form-text" [1], I
became aware of the SymbolConstants.ERROR_CSS_CLASS configuration symbol.
Setting its value to "form-text text-danger" did the trick for me.

Two recommendations for improvement:

First, the Configuration page of the Tapestry website [2] doesn't mention
the ERROR_CSS_CLASS configuration symbol. It should be added to make it
easier for other Tapestry users trying to solve the same problem or similar
problems.

Second, importing  the Bootstrap4Module should provide validation messages
with a red font color as the default.

Thank you for the time your are putting into Tapestry. I'm a big fan.

Volker

[1] https://getbootstrap.com/docs/4.3/components/forms/#help-text
[2] https://tapestry.apache.org/configuration.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.