Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アクションでいくつかの操作を行っており、一部のデータ入力が有効な範囲にない場合にエラー メッセージを表示したいと考えています。通常、JavaScript メソッドを使用して事前チェックを行いますが、この場合、チェックする必要がある変数の値に到達できません。
エラーメッセージを表示する Web ページの部分がストラット部分です
前もって感謝します
フォーム検証メソッドを使用して検証できます。フォームを送信する前に、状態がチェックされます。
例 :-
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { //Write your code for range checking here return errors; }
を除いて、このメソッドはいくつかの設定を行う必要がありますApplicationResources.property file
ApplicationResources.property file