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 chknumsymbol: [ 109 "æ°åã¨:ï¼ã~ã®ã¿å ¥åã§ãã¾ã", 110 /^[0-9ï¼-ï¼:ï¼~ã]+$/ 111 ], 112 chkmin: [ 113 "æå以ä¸ã§å ¥åãã¦ãã ãã", 114 function(txt, t) { 115 if ( txt.length === 0 ) return true; 116 var length = $(t).attr("class").match(/min(\d+)/) ? RegExp.$1 : null; 117 return txt.length >= length; 118 } 119 ], 120 chkmax: [ 121 "æå以å ã§å ¥åãã¦ãã ãã", 122 function(txt, t) { 123 var length = $(t).attr("class").match(/max(\d+)/) ? RegExp.$1 : null; 124 return txt.length <= length; 125 } 126 ], 127 chkradio: [ 128 "鏿ãã¦ãã ãã", 129 function(txt, t) { 130 return $("input:checked",t).length>0; 131 } 132 ], 133 chkcheckbox: [ 134 "ä¸è¨ã«åæããã ããªãå ´åãï½ã»ãããããå©ç¨ã«ãªãã¾ãã", 135 function(txt, t) { 136 return $("input:checked",t).length>0; 137 } 138 ], 139 chkzip: [ 140 "æ£ããéµä¾¿çªå·ã®å½¢å¼ãå ¥åãã¦ãã ãã", 141 /^(?:\d{3}-?\d{4}$|^\d{3}-?\d{2}$|^\d{3}$)*$/ 142 ], 143 chkurl: [ 144 "æ£ããURLã®å½¢å¼ãå ¥åãã¦ãã ãã", 145 /^(?:(?:ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)*$/ 146 ], 147 chktel: [ 148 "æ£ããé»è©±çªå·ãå ¥åãã¦ãã ãã", 149 /^(?:\(?\d+\)?\-?\d+\-?\d+)*$/ 150 ], 151 chkfax: [ 152 "æ£ãããã¡ãã¯ã¹çªå·ãå ¥åãã¦ãã ãã", 153 /^(?:\(?\d+\)?\-?\d+\-?\d+)*$/ 154 ], 155 chkfile: [ 156 "ãã¡ã¤ã«ã鏿ãã¦ãã ãã", 157 function(txt, t) { 158 if ( txt && txt.length>0 ) { 159 if ( /^[ ã\r\n\t]+$/.test(txt) ) { 160 return false;
161 } else { 162 return true; 163 } 164 } 165 } 166 ] 167 }); 168})(jQuery); 169
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.