fixed validation (still on submit, not while typing).