-
Notifications
You must be signed in to change notification settings - Fork 653
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
Validation message styling through validationHtmlClass #444
base: development
Are you sure you want to change the base?
Validation message styling through validationHtmlClass #444
Conversation
Hi @prabhatsharma and thank you for the PR! I'm a bit reluctant adding another watch,could this be solved by CSS in combo with |
Understand your concern around adding something extra, but we have tried fixing the styling through various means (css, htmlClass and overriding help-block) with success in many cases. However all scenarios are not getting covered with these and overriding help-block impacts other fields as well and is not really a good idea. Would appreciate your consideration in getting this incorporated. This would make styling a lot simpler for validation messages. |
@prabhatsharma I know it has been a long time, but with David no longer on the development can you please give me an idea of the use cases you feel this supports that couldn't be worked out in any other way, like perhaps in a plunker? |
Hi there, Idea of having this PR was to be able to add styling to the validation message that happens on schemaform fields. In absence of this implementing custom styling is difficult and we had to resort to creating custom schemaform components. Schemaform already provides styling for label and field for teh component, but not for validation message. |
So I basically have one thing here and that is for pure traceability, I do not like that the code block has moved the way it have, it means that diffs involving this code will always be problematic because of this commit. I couldn't/wouldn't even find the change. |
@prabhatsharma Nicklas is Referring to the dist folder, that will need to be reverted before any PR could be accepted. When I asked about what you can't do, I mean if you use the parent tag it gets has-error and also names field type ie. .schema-form-section, so I am just wondering what scenario you are having trouble supporting with CSS? Whatever you add to form.htmlClass you could use as: .my-css-class.has-error .help-block {
}
.has-error .help-block {
} If there are any specific templates that don't behave in a consistent way which made that difficult I would gladly accept a PR that made them behave in a way that made a simple CSS rule apply across all templates. |
@prabhatsharma, @Anthropic I am sorry, and thanks for the save there @Anthropic but that was just me being an idiot. :-) (however it is kind of why we don't want dist files to be included in commits) |
Needed support for custom styling of validation messages . #443