// 入力エラーを目立たせるためバリデーションチェックをjqueryで行う Task-Id: Redmine 12186 $(document).ready(function(){ $("#m_form").validationEngine( "attach",{ // エラー文言の表示位置 promptPosition : "centerRight", // バリデーションチェック後の処理 onValidationComplete: function(form, valid){ if (valid) { m_message = $("input[name='m_msg_values']:checked").val(); if(m_message == "その他" && jQuery.trim($("#m_message_other").val()) != ""){ m_message = jQuery.trim($("#m_message_other").val()); } $("#m_message").val(m_message); submitForm("m_form"); } } } ); // テキストエリアのみ、エラー文言の表示位置をtopLeftに $("textarea").attr('data-prompt-position', "topLeft"); $("textarea").data('promptPosition', "topLeft"); });