mozilla/webpay — pull request #119 by muffinresearch (2013-05-13 11:50:11+00:00)
Title: Improved JS pin validation (864703, 865661)

This branch checks the keypress event on the input to only allow valid input. Eventually pin inputs on B2G will be with a numeric only keyboard hence the addition of the x-inputmode attribute on the input field.

This is far from ideal as an approach - however, unfortunately validating the pin by value is very problematic because as soon as the value becomes invalid the value from JS is an empty string and we can't use a more liberal input type because type=number is needed to bring up the correct keyboard. In addition in B2g there's no way to know the field is invalid programatically when the value becomes an empty string.