commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / bower_components / jquery-validation / src / additional / extension.js
1 // Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
2 $.validator.addMethod("extension", function(value, element, param) {
3 param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
4 return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
5 }, $.validator.format("Please enter a value with a valid extension."));