Skip to content
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

Added showInlineError to bootstrap theme #84

Merged
merged 3 commits into from
Jul 26, 2016

Conversation

zeroasterisk
Copy link
Contributor

If true, we could include the error message as a text block with the input form.

This seems like a very useful option,
especially for forms where the errors are not rendered.

If true, we could include the error message as a text block with the input form.

This seems like a very useful option,
especially for forms where the errors are not rendered.
@radekmie radekmie added the Type: Feature New features and feature requests label Jul 26, 2016
@radekmie
Copy link
Contributor

Yes, inline errors are useful.

@@ -41,11 +42,13 @@ const FormGroup = ({
<section className={classnames(wrapClassName, gridClassName(grid, 'input'))}>
{children}
{makeHelp(help, helpClassName)}
{error && showError ? makeHelp(error, 'text-help') : ''}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why makeHelp(error, ...) and not errorMessage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be wrapped in <span.text-help>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I get it, but error is an object, not a String - errorMessage is a String.

@radekmie
Copy link
Contributor

Two more things: how about renaming it to inlineError or showInlineError?


Could you also implement it for bootstrap-3?

@zeroasterisk
Copy link
Contributor Author

Sure - I was just making sure you were on-board... I'll whip it up

@zeroasterisk zeroasterisk changed the title An idea for showError Boolean An idea for showInlineError Boolean Jul 26, 2016
@zeroasterisk
Copy link
Contributor Author

@radekmie ok - bootstrap 3 & 4 are implemented, showInlineError will render the inline spans as help blocks/texts, as a sibling to any existing help blocks/texts

@radekmie radekmie merged commit adc6f96 into vazco:master Jul 26, 2016
@radekmie
Copy link
Contributor

Great!

@zeroasterisk zeroasterisk deleted the feature-bs-error-as-help branch July 26, 2016 19:01
@radekmie radekmie changed the title An idea for showInlineError Boolean Added showInlineError to bootstrap theme Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants