Skip to content

Commit 29e3a74

Browse files
Arknistaabm
authored andcommitted
Entries: Add deprecation warning to date method (#43)
Ref jquery-validation/jquery-validation#1787
1 parent 7fe2470 commit 29e3a74

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

entries/date-method.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0"?>
22
<entry name="date" type="method" return="Boolean">
3-
<title>date method</title>
3+
<title>[DEPRECATED] date method</title>
44
<desc>Makes the element require a date.</desc>
55
<longdesc>
66
Return true if the value is a valid date. Uses JavaScript's built-in Date to test if the date is valid, and therefore does no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
7-
<p>This method should not be used, since it relies on the <code>new Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</p>
7+
<p><strong>DEPRECATION warning:</strong></p>
8+
<p style="font-style: italic;"><strong>This method is deprecated and will be removed in version <code>2.0.0</code>.<br/>Please don't use it, since it relies on the <code>Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</strong></p>
89
</longdesc>
910
<example>
1011
<desc>Makes "field" required and a date.</desc>

0 commit comments

Comments
 (0)