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

Success class #18

Closed
zslabs opened this issue Feb 5, 2017 · 4 comments
Closed

Success class #18

zslabs opened this issue Feb 5, 2017 · 4 comments

Comments

@zslabs
Copy link

zslabs commented Feb 5, 2017

Hi all,
I saw there was a errorClass option, but am not seeing anything that would allow a "success" class to be added to input groups - is that possible?

@Mevrael
Copy link
Owner

Mevrael commented Feb 5, 2017

Hi @zslabs

Thank you for your interest in the BunnyJS and submitting your issue.

Please, in the future, always provide all the detailed information about your issue - which component exactly are you speaking about, that might be also represented in the title of the issue.

I suppose you are talking about the src/Validation.

Since success state to input is added in very rare cases and I can't remember any of them, there is currently no success state in Bunny Validation, thus, there is no option to add a success class.

Could you, please provide, a use-case, how exactly and when exactly you would like to add a success state to your input? I suppose during the Validation.validateSection() or init() when inputs are checked, if input passed a validation you would like to add a different class to an input group, am I right?

@zslabs
Copy link
Author

zslabs commented Feb 5, 2017

Hey @Mevrael,
Appreciate the reply. Here's a screen shot of the various states of form inputs that I'd be looking for:

screen shot 2017-02-05 at 2 44 37 pm

  • Default
  • Required
  • Success (passed validation)
  • Error (failed validation)

I use the following classes on what Bunny refers to as the the form container,

  • (none for default)
  • is-required
  • is-valid
  • is-notValid

@Mevrael
Copy link
Owner

Mevrael commented Feb 5, 2017

0.14.9

added ValidationConfig.classInputGroupSuccess which defaults to BS4 has-success.

To activate this feature add showvalid attribute to <form>

@zslabs
Copy link
Author

zslabs commented Feb 6, 2017

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants