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

Invalid styling only applied when placeholder is not shown #351

Open
juthilo opened this issue Mar 3, 2023 · 2 comments
Open

Invalid styling only applied when placeholder is not shown #351

juthilo opened this issue Mar 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@juthilo
Copy link
Contributor

juthilo commented Mar 3, 2023

We're not sure if this is the intended behavior: an input with label and placeholder that is marked as required and empty will never be styled as invalid because the invalid rule is restricted to :not(:placeholder-shown). We would argue that placeholders are intended to indicate what should be entered into a field and not that the field is optional.

@mfranzke
Copy link
Member

mfranzke commented Mar 6, 2023

You're right – it's a bad workaround until we get :user-invalid soon. At least the error message would still get displayed, but not the color for this constellation. I'll keep this ticket open so that we could use it as a reminder for :user-invalid.

@mfranzke mfranzke added the bug Something isn't working label Mar 6, 2023
@d-koppenhagen
Copy link
Contributor

See #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants