input field as number and max attribute in js template