Showing validation errors inline as the user is filling out the form can lead to a better use experience. Learn how to do this using the Client Side Validations gem.
263: クライアント側での検証 (view original Railscast) Other translations: Other formats: Written by Naomi Fujimoto ウェブサイトの長い入力フォームを埋めて送信した後に検証エラーがいくつも返されてくるのはイライラするものです。フィールドに対するエラーをそのフィールドへの入力が終わる都度表示できれば、ずっと優れたユーザ体験を提供できるでしょう。しかしそのためには、JavaScriptでチェック用コードを大量に書く必要があります。 今回のエピソードでは、クライアント側の検証を自動的に設定してくれるgemを紹介します。たとえば、入力フィールドが4つある、次のような新規ユーザ用の登録フォームを持つアプリケーションがあるとしましょう。 Userモデルにはいくつかの検証機能があります。その内の一つが必須入力フ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く