Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.87k stars 4.74k forks source link

Invalid select does not become invalid input #6049

Open jpic opened 6 years ago

jpic commented 6 years ago

Instanciate a materialize select and it will not port the "invalid" class from the select to the created input element: 2018-07-31-012804_472x198_scrot Resulting in: 2018-07-31-012443_772x123_scrot Instead of: 2018-07-31-013559_769x117_scrot

acburst commented 6 years ago

You can use the classes option in the Select plugin to pass classes to the select-wrapper. Currently there is no way to pass classes to the input, but you can style accordingly from the select-wrapper class

jpic commented 6 years ago

@acburst are you sure that this shouldn't be the default behaviour according to material guidelines ?

WhileLoop commented 5 years ago

This is a huge limitation for me when using Vue since I can't bind a dynamic class to the input element using single file component templates.

TravelTimN commented 4 years ago

Custom jQuery and vanilla JS code I've created to fix this issue for my own projects. Both work like a charm, but it would be fantastic to get proper validation similar to this on the actual framework source code.

https://codepen.io/traveltimn/full/QWyoVOm

jpic commented 4 years ago

@TravelTimN probably not happening, this package is not maintained:

2020-07-24-203437_557x790_scrot