The simplest way I’ve found to restrict the entry of characters to only allow entry of valid Shift-JIS characters is just to check each character in the input field and throw an error on the entry of an invalid character.
タグアーカイブ:validation
[Java] Bean validation 1.1(JSR303, JSR349)の拡張
Javaでオブジェクトをバリデーションする仕様にBean validationがあります。