[bug 839417] Replace custom js with input type="number" pattern="\d*".