Commit c3353135 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Re-enforce the rule for the publications field defense and submitted.

parent dc131d8b
......@@ -107,9 +107,21 @@ db.publications.first_author.filter_in = dbui.CLEAN_COMMA
db.publications.title.filter_in = dbui.CLEAN_SPACES
db.publications.authors.requires = IS_LENGTH(65535)
# rule: 30 Dec 2012
db.publications.defense.requires = IS_MATCH('\d{2} [A-Z][a-z]{2} \d{4}')
db.publications.id_publishers.requires = IS_IN_DB(db, 'publishers.abbreviation')
# rule: 10-14 Dec 2012 or 28 Jun - 4 Jul 2012
reg1 = '\d{1,2}-\d{1,2} [A-Z][a-z]{2} \d{4}'
reg2 = '\d{1,2} [A-Z][a-z]{2} -\d{1,2} [A-Z][a-z]{2} \d{4}'
db.publications.conference_dates.requires = IS_MATCH('%s|%s' % (reg1, reg2))
db.publications.conference_url.requires = IS_EMPTY_OR(IS_URL())
db.publications.origin.requires = IS_EMPTY_OR(IS_URL())
db.publications.publication_url.requires = IS_EMPTY_OR(IS_URL())
db.publications.submitted.requires = IS_MATCH('^\d{4}-\d{2}(-\d{2})?$')
# rule: 2012-12 or 2012-12-31
db.publications.submitted.requires = IS_MATCH('\d{4}-\d{2}(-\d{2})?')
db.publications.year.requires = IS_INT_IN_RANGE(1900, year+1)
\ No newline at end of file
......@@ -19,8 +19,11 @@ HEAD
- Remove obsolete controller toolbox. It is now replaced by standalone
scripts: export-to-csv, import-from-csv, fix-conference-dates, fix-country,
fix-defense, fix-submitted
- The list of country is almost frozen. Add the script fix-country.py
to correct invalid country name in the exiting database.
- The list of country is almost frozen by using the default list coming
from a geographical database (www.geonames.org).
Harvester can not add country anymore.
- Re-enforce rule for publications fields: defense, conference_dates
and submitted.
0.8.7.2 (Sep 2014)
- Migrate to plugin_dbui 0.6.1.7.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment