.validation.string(value, messages, {"message":"from必须是一条字符串。","max":255,"tooLong":"from只能包含至多255个字符。","skipOnEmpty":1});yii.validation.required(value, messages, {"message":"from不能为空。"});}},{"id":"sendmail-email","name":"email","container":".field-foot-email-name","input":"#foot-email-name","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Eメール必须是一条字符串。","max":50,"tooLong":"Eメール只能包含至多50个字符。","skipOnEmpty":1});yii.validation.required(value, messages, {"message":"メールが必要です."});yii.validation.email(value, messages, {"pattern":/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/,"fullPattern":/^[^@]*<[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?>$/,"allowName":false,"message":"このメールは無効です.","enableIDN":false,"skipOnEmpty":1});}},{"id":"sendmail-message","name":"message","container":".field-foot-email-message","input":"#foot-email-message","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"マッサージ必须是一条字符串。","max":255,"tooLong":"マッサージ只能包含至多255个字符。","skipOnEmpty":1});yii.validation.required(value, messages, {"message":"マッサージが必要です."});}}], []); $("#search_form").submit(function(e){ if ($("#keywordInput").val().length==0){ alert("Keyword is required"); return false; } }); });