1/*! 2 * exchecker-ja 3 * 4 * @version : 1.1 5 * @author : nori ([email protected]) 6 * @copyright : 5509 (http://5509.me/) 7 * @license : The MIT License 8 * @link : http://5509.me/log/exvalidation 9 * @modified : 2012-04-09 16:52 10 */ 11;(function($) { 12 // Extend validation rules 13 $.exValidationRules = $.extend($.exValidationRules, { 14 chkrequired: [ 15 "å ¥åãã¦ãã ãã", 16 function(txt, t) { 17 if ( $(t).hasClass("chkgroup") ) { 18 var flag = 0; 19 $("input,select",t).each(function() { 20 if ( $(this).val().length > 0 ) flag++; 21 }); 22 if ( txt && flag === $("input,select", t).length ) { 23 if ( /^[ ã\r\n\t]+$/.test(txt) ) { 24 return false; 25 } else { 26 return true; 27 } 28 } 29 } else { 30 if ( txt && txt.length>0 ) { 31 if ( /^[ ã\r\n\t]+$/.test(txt) ) { 32 return false; 33 } else { 34 return true; 35 } 36 } 37 } 38 } 39 ], 40 chkselect: [ 41 "鏿ãã¦ãã ãã", 42 function(txt, t) { 43 if ( txt && txt.length>0 ) { 44 if ( /^[ ã\r\n\t]+$/.test(txt) ) { 45 return false; 46 } else { 47 return true; 48 } 49 } 50 } 51 ], 52 chkretype: [ 53 "å ¥åå 容ãç°ãªãã¾ã", 54 function(txt, t) { 55 var elm = $("#" + $(t).attr("class").split("retype\-")[1].split(/\b/)[0]); 56 if ( elm.hasClass("chkgroup") ) { 57 var chktxt = $("input", elm), txt = $("input", t); 58 for ( var i = 0, flag = false; i < chktxt.length; i++ ) { 59 if ( chktxt[i].value === txt[i].value ) { 60 flag = true; 61 } else { 62 flag = false; 63 break; 64 } 65 } 66 if ( flag ) return true; 67 } else { 68 return elm.val() == txt; 69 } 70 } 71 ], 72 chkemail: [ 73 "æ£ããã¡ã¼ã«ã¢ãã¬ã¹ã®å½¢å¼ãå ¥åãã¦ãã ãã", 74 /^(?:[^\@]+?@[A-Za-z0-9_\.\-]+\.+[A-Za-z\.\-\_]+)*$/ 75 ], 76 chkhankaku: [ 77 "å ¨è§æåã¯ä½¿ç¨ã§ãã¾ãã", 78 /^(?:[a-zA-Z0-9@\<\>\;\:\[\]\{\}\|\^\=\/\!\*\`\"\#\$\+\%\&\'\(\)\,\.\-\_\?\\\s]*)*$/ 79 ], //" 80 chkzenkaku: [ 81 "å ¨è§æåã§å ¥åãã¦ãã ãã", 82 /^(?:[^a-zA-Z0-9@\<\>\;\:\[\]\{\}\|\^\=\/\!\*\"\#\$\+\%\&\'\(\)\,\.\-\_\?\\\s]+)*$/ 83 ], 84 chkhiragana: [ 85 "ã²ãããªã§å ¥åãã¦ãã ãã", 86 /^(?:[ã-ã]+)*$/ 87 ], 88 chkkatakana: [ 89 "ã«ã¿ã«ãã§å ¥åãã¦ãã ãã", 90 /^(?:[ã¡-ã¾]+)*$/ 91 ], 92 chkfurigana: [ 93 "ãµãããªã¯ã²ãããªãå ¨è§æ°åã¨ããã¼ãï¼ï¼ãå©ç¨ã§ãã¾ã", 94 /^(?:[ã-ãï¼-ï¼ã¼ï½ï¼ï¼\(\)\d ã]+)*$/ 95 ], 96 chknochar: [ 97 "è±æ°åã§å ¥åãã¦ãã ãã", 98 /^(?:[a-zA-Z0-9]+)*$/ 99 ], 100 chknocaps: [ 101 "è±æ°å(å°æåã®ã¿)ã§å ¥åãã¦ãã ãã", 102 /^(?:[a-z0-9]+)*$/ 103 ], 104 chknumonly: [ 105 "åè§æ°åã®ã¿ã§å ¥åãã¦ãã ãã", 106 /^(?:[0-9]+)*$/ 107 ], 108 chkmin: [ 109 "æå以ä¸ã§å ¥åãã¦ãã ãã", 110 function(txt, t) { 111 if ( txt.length === 0 ) return true; 112 var length = $(t).attr("class").match(/min(\d+)/) ? RegExp.$1 : null; 113 return txt.length >= length; 114 } 115 ], 116 chkmax: [ 117 "æå以å ã§å ¥åãã¦ãã ãã", 118 function(txt, t) { 119 var length = $(t).attr("class").match(/max(\d+)/) ? RegExp.$1 : null; 120 return txt.length <= length; 121 } 122 ], 123 chkradio: [ 124 "鏿ãã¦ãã ãã", 125 function(txt, t) { 126 return $("input:checked",t).length>0; 127 } 128 ], 129 chkcheckbox: [ 130 "鏿ãã¦ãã ãã", 131 function(txt, t) { 132 return $("input:checked",t).length>0; 133 } 134 ], 135 chkzip: [ 136 "æ£ããéµä¾¿çªå·ã®å½¢å¼ãå ¥åãã¦ãã ãã", 137 /^(?:\d{3}-?\d{4}$|^\d{3}-?\d{2}$|^\d{3}$)*$/ 138 ], 139 chkurl: [ 140 "æ£ããURLã®å½¢å¼ãå ¥åãã¦ãã ãã", 141 /^(?:(?:ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)*$/ 142 ], 143 chktel: [ 144 "æ£ããé»è©±çªå·ãå ¥åãã¦ãã ãã", 145 /^(?:\(?\d+\)?\-?\d+\-?\d+)*$/ 146 ], 147 chkfax: [ 148 "æ£ãããã¡ãã¯ã¹çªå·ãå ¥åãã¦ãã ãã", 149 /^(?:\(?\d+\)?\-?\d+\-?\d+)*$/ 150 ], 151 chkfile: [ 152 "ãã¡ã¤ã«ã鏿ãã¦ãã ãã", 153 function(txt, t) { 154 if ( txt && txt.length>0 ) { 155 if ( /^[ ã\r\n\t]+$/.test(txt) ) { 156 return false; 157 } else { 158 return true; 159 } 160 } 161 } 162 ] 163 }); 164})(jQuery); 165
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.