Revision c1f05dac
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
js/kivi.Validator.js | ||
---|---|---|
142 | 142 |
ns.annotate($e_annotate); |
143 | 143 |
return true; |
144 | 144 |
} |
145 |
}, |
|
146 |
trimmed_whitespaces: function($e, $e_annotate) { |
|
147 |
$e_annotate = $e_annotate || $e; |
|
148 |
|
|
149 |
var string = $e.val(); |
|
150 |
|
|
151 |
if ($e.hasClass('tooltipstered')) |
|
152 |
$e.tooltipster('destroy'); |
|
153 |
|
|
154 |
if (string.match(/^\s|\s$/)) { |
|
155 |
$e.val(string.trim()); |
|
156 |
|
|
157 |
$e.tooltipster({ |
|
158 |
content: kivi.t8("Leading and trailing whitespaces have been removed."), |
|
159 |
contentAsHTML: true, |
|
160 |
theme: 'tooltipster-light', |
|
161 |
}); |
|
162 |
$e.tooltipster('show'); |
|
163 |
} |
|
164 |
return true; |
|
145 | 165 |
} |
146 | 166 |
}; |
147 | 167 |
|
Auch abrufbar als: Unified diff
js-Validator: Leerzeichen trimmen können