Materialize: Validation is not working on select

Created on 19 Aug 2015  Â·  8Comments  Â·  Source: Dogfalo/materialize

I am using jquery validation its working fine on textboxes but not working on select.
here is screenshot.
image

Most helpful comment

I have the same problem, one solution was to add:
$(document).ready(function() {
$('select').material_select();
$("select[required]").css({position: 'absolute', display: 'inline', height: 0, padding: 0, width: 0});
});

All 8 comments

Complex validation not provided by the HTML has been left out of the scope of this project: https://github.com/Dogfalo/materialize/issues/1454

Why not simply provide Custom Error & Success Messages using the data-error and data-success label attributes (introduced in v0.97) for selects too... ?? Is this really complex?

Check: http://materializecss.com/forms.html

Because there is no html5 validation for selects.
On Sep 1, 2015 12:01 AM, "boustanihani" [email protected] wrote:

Why not simply provide _Custom Error & Success Messages_ using the
data-error and data-success label attributes for selects too... ?? Is
this really complex?

—
Reply to this email directly or view it on GitHub
https://github.com/Dogfalo/materialize/issues/1933#issuecomment-136608340
.

I have the same problem, ¿Did you find any solution?

Tenho o mesmo problema, uma solução foi adicionar:

$(document).ready(function() {
$('select').material_select();
$("select[required]").css({position: 'absolute', display: 'inline', height: 0, padding: 0, width: 0});
});

captura de tela de 2017-06-01 13-59-31

I don't speak Spanish :/

I have the same problem, one solution was to add:
$(document).ready(function() {
$('select').material_select();
$("select[required]").css({position: 'absolute', display: 'inline', height: 0, padding: 0, width: 0});
});

$("select[required]").css({position: 'absolute', display: 'inline', height: 0, padding: 0, width: 0});
});
This seems to work fine...but is there any chances of added in future versions. I am using 1.0.0.
Also I thought it would be able to use this as out of box feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericlormul picture ericlormul  Â·  3Comments

alexknipfer picture alexknipfer  Â·  3Comments

serkandurusoy picture serkandurusoy  Â·  3Comments

artur99 picture artur99  Â·  3Comments

djensen47 picture djensen47  Â·  3Comments