Ticket #1567 (closed enhancement: fixed)

Opened 8 years ago

Last modified 2 years ago

Validation Hook called before validating item/checking required fields

Reported by: tmb@… Owned by: cjg
Priority: Intend to Milestone: EPrints Wishlist
Component: Default Config Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by cjg) (diff)

Need a validation hook which is called before any validation of an item takes place. If the hook returns false, the item will not be validated.

Example scenario: I've imported some records from the 70s, which don't have documents attached. I spot a typo in the metadata and try to fix it, but the validation rules for entering/editing items state that every item *must* have a document attached so I can't fix the typo unless I can find an electronic copy of the document (unlikely) or change the config (which I don't want to do because I want all new items deposited to require a document).

Desired solution: I define a validation hook which checks for a (hidden?) 'legacy' field. If this is set, I return false, and the item is not validated, otherwise I return true and the item is subject to the validation of the repository.

Change History

Changed 8 years ago by tmb@…

  • blocked set to 1564

Changed 7 years ago by cjg

  • owner changed from cjg@… to cjg
  • type changed from defect to enhancement
  • description modified (diff)

Changed 2 years ago by pm705@…

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.