Skip to content

ability to generate warning form state#26471

Closed
wojtask9 wants to merge 1 commit intotwbs:v4-devfrom
wojtask9:form-state
Closed

ability to generate warning form state#26471
wojtask9 wants to merge 1 commit intotwbs:v4-devfrom
wojtask9:form-state

Conversation

@wojtask9
Copy link
Copy Markdown
Contributor

@wojtask9 wojtask9 commented May 9, 2018

Currently there is no way to generate warning state for form inputs because css rules with state other than valid and invalid is dropped by browsers.

With this PR we are able to generate other states than valid and invalid for example

@include form-validation-state("warning", $warning);

or

@include form-validation-state("info", $info);

Edit: This is useful if we want Server Side validation

@mdo
Copy link
Copy Markdown
Member

mdo commented May 10, 2018

This has been shot down at least once before, but suffice to say we're not going to add it as our validation states are based on what the browser provides.

@mdo mdo closed this May 10, 2018
@wojtask9
Copy link
Copy Markdown
Contributor Author

wojtask9 commented May 10, 2018

@mdo
I understand your concerns. This PR is not about adding or support other states than valid and invalid by default.
This is about utilize existing mixin to generate other states in custom builds.
Currently mixin form-validation-state is large and reusing in custom builds would be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants