input field restrictions in js