Skip to content

Commit

Permalink
changes for internetarchive#7073
Browse files Browse the repository at this point in the history
  • Loading branch information
lijerry committed Apr 26, 2024
1 parent 63b774b commit 9a7cd26
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions openlibrary/plugins/openlibrary/js/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ export default function initValidate() {
'Are you sure that\'s the published date?'
);

// same as validate publish-date, but does not require an input
// used in templates/books/add.html
jQuery.validator.addMethod('original-publish-date', function(value) {
// if it doesn't have even three digits then it can't be a future date
var tokens = /(\d{3,})/.exec(value);

var year = new Date().getFullYear();
return tokens=== null || (tokens && tokens[1] && parseInt(tokens[1]) <= year + 1); // allow one year in future.
},
'Are you sure that\'s the published date?'
);

$.validator.messages.required = '';
$.validator.messages.email = ugettext('Are you sure that\'s an email address?');

Expand Down

0 comments on commit 9a7cd26

Please sign in to comment.