[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Custom validation and new MetaFields (institutional id, orcid id)



Hi Clinton,
Have you seen this: https://github.com/eprints/orcid_support - and specifically https://github.com/eprints/orcid_support/blob/master/lib/plugins/EPrints/MetaField/Orcid.pm ?

If you are re-purposing a field, I'd be careful e.g. if the new fieldtype has a lower character limit, you could lose data.
I normally have a preliminary check of the data - in the database - trying to find data that wouldn't fit into the new field type.

Are you aware of validation triggers?
E.g. https://github.com/eprintsug/datesdatesdates/blob/master/lib/cfg.d/zz_datesdatesdates_triggers.pl#L49

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Graham, Clinton T
Sent: 18 November 2016 14:36
To: Eprints Tech Mailing List <eprints-tech at ecs.soton.ac.uk>
Subject: [EP-tech] Custom validation and new MetaFields (institutional id, orcid id)

We are soliciting an Institutional ID and ORCID ID for our users and for our deposits.  Each of these require custom validation.  It seems the best place for this validation is in field_validate.pl, presumably by creating new MetaFields for each of these entries and keying on the new MetaField types.

Is this standard practice?  A brief search doesn't pull documentation or examples of subclassing new MetaFields.

Are there any concerns with adjusting the field types for these fields, for which data already exists in deposited records?

Enjoy,

- Clinton Graham
Systems Developer
University of Pittsburgh | University Library System
412-383-1057

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20161118/53c2dc3a/attachment.html