only test minlength/maxlength if value is not the empty string
work on mediacapture + documented getUserMedia