<html xmlns = "http://www.w3.org/1999/xhtml"> <head> <script src = "easyui1.2.4/jQuery-1.6.min.js" Type = "Text/Javascript"> </script src = "ease ui1.2.4/jquery. type = "text/javascript"> </script> <! - カスタム検証 - > <スクリプトsrc = "easyui1.2.4/validator.js" type = "> javascript"> </javascript> <link href = " //テキストの設定では、検証が必要です$( 'input [type = text]') InvalidMessage = "URL形式は間違っています[http://www.example.com]" /> <br />長さ検証:<入力タイプ= "text" validtype = "lengthmessage =" invalidmessage = "valid 8-20" />> <br />携帯電話タイプ= "" validtype " /> <br />> <br /> type = "text" balidtype = "zipcode" /> <br /> account execification:<input type = "text" validtype = "account [8,20]" /> <br />漢字確認:<入力タイプ= "text" validtype = "chs" /> <br />リモート検証= <入力タイプ= "テキスト" balimtype = " InvalidMessage = "ユーザー名はすでに存在します"/> </body> </html>
// custom validator.js // easyi form $ .extend($。fn.validatebox.defaults.rules、{//漢字chs:{validator:function(value){return/^:/u0391-/uffe5] +$/.test(value); {//テキストボックスの値の検証{var reg =/^1 [3 | 5 | 9] {9} $/; /^[1-9]/d {5} $/; {$ .fn.validatebox.defaults.rules.account.message = 'ユーザー名は' + param [0] + ' +' + 'range'}数字、underscoreで構成されています。 ';