[jQuery] Validation Plugin: additional-methods.js

[jQuery] Validation Plugin: additional-methods.js

Thanks again to Jorn for a fantastic plugin. One thing I noticed, with the additional-methods.js file that is included with the download, is a small error with the messages for the maxWords, minWords, and rangeWords methods. They are missing $.format():<div>
</div><div><div>jQuery.validator.addMethod("maxWords", function(value, element, params) { </div><div>    return this.optional(element) || value.match(/\b\w+\b/g).length < params; </div><div>}, $.format("Please enter {0} words or less.")); </div>
<div> </div><div>jQuery.validator.addMethod("minWords", function(value, element, params) { </div><div>    return this.optional(element) || value.match(/\b\w+\b/g).length >= params; </div><div>}, $.format("Please enter at least {0} words.")); </div>
<div> </div><div>jQuery.validator.addMethod("rangeWords", function(value, element, params) { </div><div>    return this.optional(element) || value.match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1]; </div>
<div>}, $.format("Please enter between {0} and {1} words."));</div>
--
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
<a href="http://blog.cutterscrossing.com">http://blog.cutterscrossing.com</a>
---------------
Co-Author 'Learning Ext JS'
</div><div><a href="http://www.packtpub.com/learning-ext-js/book">http://www.packtpub.com/learning-ext-js/book</a>
</div>