Skip to content

Commit 1d21c70

Browse files
Arknistaabm
authored andcommitted
Entries: Note that the normalizer can return any value (#39)
Ref jquery-validation/jquery-validation#2054
1 parent 7eeb403 commit 1d21c70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entries/normalizer.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<p>Transform the value of an element and the result for validation instead of the initial value. The normalizer can be defined global to all elements or local to only one element. With that said, the local normalizer will only run for the element for which it was defined. The global normalizer will run for all validated elements. This normalizer can be then overrided for each element, as needed, by attaching one to it. This way only the local one will run for that element, and the global one will run for others.</p>
1212
<p>Note that this method:</p>
1313
<ul>
14+
<li><p>Has been available since version <code>1.15.0</code></p></li>
1415
<li><p>Doesn't change the elements' value, it only changes the value used for validation.</p></li>
1516
<li><p>Gets the value passed as argument, and "this" within it references the corresponding <code>DOMElement</code>.</p></li>
16-
<li><p>Needs to return a String value, otherwise it will throw a <code>TypeError</code> exception.</p></li>
17+
<li><p>For versions between <code>1.15.0</code> and <code>1.17.0</code>, it must return a string value. And as of <code>1.17.1</code>, it can return any value including <code>null</code> and <code>undefined</code>.</p></li>
1718
</ul>
1819
</longdesc>
1920
<example>

0 commit comments

Comments
 (0)